|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.TemplateEngine.Edge.BuiltInManagedProvider
{
internal partial class GlobalSettingsJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>? _TemplatePackageData;
/// <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.TemplateEngine.Abstractions.Installer.TemplatePackageData> TemplatePackageData
#nullable enable annotations
{
get => _TemplatePackageData ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>)Options.GetTypeInfo(typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData> Create_TemplatePackageData(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData((global::System.Guid)args[0], (string)args[1], (global::System.DateTime)args[2], (global::System.Collections.Generic.IReadOnlyDictionary<string, string>)args[3]),
PropertyMetadataInitializer = _ => TemplatePackageDataPropInit(options),
ConstructorParameterMetadataInitializer = TemplatePackageDataCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Guid), typeof(string), typeof(global::System.DateTime), typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>)}, modifiers: null),
SerializeHandler = TemplatePackageDataSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] TemplatePackageDataPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[4];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyDictionary<string, string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)obj).Details,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Details",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData).GetProperty("Details", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyDictionary<string, string>>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Guid>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)obj).InstallerId,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "InstallerId",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData).GetProperty("InstallerId", InstanceMemberBindingFlags, null, typeof(global::System.Guid), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Guid>(options, info1);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTime>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)obj).LastChangeTime,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "LastChangeTime",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData).GetProperty("LastChangeTime", InstanceMemberBindingFlags, null, typeof(global::System.DateTime), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTime>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)obj).MountPointUri,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "MountPointUri",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData).GetProperty("MountPointUri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
properties[3].IsGetNullable = false;
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 TemplatePackageDataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::System.Collections.Generic.IReadOnlyDictionary<string, string> __value_Details = ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)value).Details;
if (__value_Details is not null)
{
writer.WritePropertyName(PropName_Details);
IReadOnlyDictionaryStringStringSerializeHandler(writer, __value_Details);
}
writer.WriteString(PropName_InstallerId, ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)value).InstallerId);
writer.WriteString(PropName_LastChangeTime, ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)value).LastChangeTime);
string __value_MountPointUri = ((global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData)value).MountPointUri;
if (__value_MountPointUri is not null)
{
writer.WriteString(PropName_MountPointUri, __value_MountPointUri);
}
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] TemplatePackageDataCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "installerId",
ParameterType = typeof(global::System.Guid),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "mountPointUri",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "lastChangeTime",
ParameterType = typeof(global::System.DateTime),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "details",
ParameterType = typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
};
}
}
|