|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.DotNet.Cli.Commands.Run
{
internal partial class RunFileJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry>? _RunFileBuildCacheEntry;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
#nullable disable annotations // Marking the property type as nullable-oblivious.
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry> RunFileBuildCacheEntry
#nullable enable annotations
{
get => _RunFileBuildCacheEntry ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry> Create_RunFileBuildCacheEntry(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry>
{
ObjectCreator = () => new global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => RunFileBuildCacheEntryPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = RunFileBuildCacheEntrySerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] RunFileBuildCacheEntryPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[10];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).GlobalProperties,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "GlobalProperties",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("GlobalProperties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info0);
properties[0].ObjectCreationHandling = global::System.Text.Json.Serialization.JsonObjectCreationHandling.Populate;
properties[0].IsGetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.HashSet<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).ImplicitBuildFiles,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ImplicitBuildFiles",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("ImplicitBuildFiles", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.HashSet<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.HashSet<string>>(options, info1);
properties[1].ObjectCreationHandling = global::System.Text.Json.Serialization.JsonObjectCreationHandling.Populate;
properties[1].IsGetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableArray<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).Directives,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).Directives = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Directives",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("Directives", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Immutable.ImmutableArray<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableArray<string>>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.HashSet<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).AdditionalSources,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AdditionalSources",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("AdditionalSources", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.HashSet<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.HashSet<string>>(options, info3);
properties[3].ObjectCreationHandling = global::System.Text.Json.Serialization.JsonObjectCreationHandling.Populate;
properties[3].IsGetNullable = false;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.DotNet.Cli.Commands.Run.BuildLevel>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).BuildLevel,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).BuildLevel = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "BuildLevel",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("BuildLevel", InstanceMemberBindingFlags, null, typeof(global::Microsoft.DotNet.Cli.Commands.Run.BuildLevel), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.DotNet.Cli.Commands.Run.BuildLevel>(options, info4);
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).SdkVersion,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).SdkVersion = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "SdkVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("SdkVersion", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).RuntimeVersion,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).RuntimeVersion = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "RuntimeVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("RuntimeVersion", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.DotNet.Cli.Commands.Run.RunProperties>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).Run,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).Run = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Run",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("Run", InstanceMemberBindingFlags, null, typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunProperties), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.DotNet.Cli.Commands.Run.RunProperties>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableArray<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).CscArguments,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).CscArguments = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "CscArguments",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("CscArguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Immutable.ImmutableArray<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableArray<string>>(options, info8);
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).BuildResultFile,
Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)obj).BuildResultFile = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "BuildResultFile",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry).GetProperty("BuildResultFile", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info9);
return properties;
}
// Intentionally not a static method because we create a delegate to it. Invoking delegates to instance
// methods is almost as fast as virtual calls. Static methods need to go through a shuffle thunk.
private void RunFileBuildCacheEntrySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WritePropertyName(PropName_GlobalProperties);
DictionaryStringStringSerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).GlobalProperties);
writer.WritePropertyName(PropName_ImplicitBuildFiles);
HashSetStringSerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).ImplicitBuildFiles);
writer.WritePropertyName(PropName_Directives);
ImmutableArrayStringSerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).Directives);
writer.WritePropertyName(PropName_AdditionalSources);
HashSetStringSerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).AdditionalSources);
writer.WritePropertyName(PropName_BuildLevel);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).BuildLevel, BuildLevel);
writer.WriteString(PropName_SdkVersion, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).SdkVersion);
writer.WriteString(PropName_RuntimeVersion, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).RuntimeVersion);
writer.WritePropertyName(PropName_Run);
RunPropertiesSerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).Run);
writer.WritePropertyName(PropName_CscArguments);
ImmutableArrayStringSerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).CscArguments);
writer.WriteString(PropName_BuildResultFile, ((global::Microsoft.DotNet.Cli.Commands.Run.RunFileBuildCacheEntry)value).BuildResultFile);
writer.WriteEndObject();
}
}
}
|