|
// <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.Edge.BuiltInManagedProvider.GlobalSettingsData>? _GlobalSettingsData;
/// <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.Edge.BuiltInManagedProvider.GlobalSettingsData> GlobalSettingsData
#nullable enable annotations
{
get => _GlobalSettingsData ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData>)Options.GetTypeInfo(typeof(global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData> Create_GlobalSettingsData(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => GlobalSettingsDataPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = null,
SerializeHandler = GlobalSettingsDataSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] GlobalSettingsDataPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[1];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData)obj).Packages,
Setter = static (obj, value) => __set_GlobalSettingsData_Packages((global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData)obj, value!),
IgnoreCondition = null,
HasJsonInclude = true,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Packages",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData).GetProperty("Packages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData>>(options, info0);
properties[0].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 GlobalSettingsDataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData> __value_Packages = ((global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData)value).Packages;
if (__value_Packages is not null)
{
writer.WritePropertyName(PropName_Packages);
IReadOnlyListTemplatePackageDataSerializeHandler(writer, __value_Packages);
}
writer.WriteEndObject();
}
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Packages")]
private static extern void __set_GlobalSettingsData_Packages(global::Microsoft.TemplateEngine.Edge.BuiltInManagedProvider.GlobalSettingsData obj, global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Abstractions.Installer.TemplatePackageData> value);
}
}
|