|
// <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.Settings
{
internal partial class TemplateCacheJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache>? _TemplateCache;
/// <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.Settings.TemplateCache> TemplateCache
#nullable enable annotations
{
get => _TemplateCache ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache>)Options.GetTypeInfo(typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache> Create_TemplateCache(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => TemplateCachePropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = null,
SerializeHandler = TemplateCacheSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] TemplateCachePropInit(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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)obj).Version,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Version",
JsonPropertyName = "Version",
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)obj).Locale,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Locale",
JsonPropertyName = "Locale",
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache).GetProperty("Locale", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1);
properties[1].IsGetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Edge.Settings.TemplateInfo>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)obj).TemplateInfo,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "TemplateInfo",
JsonPropertyName = "TemplateInfo",
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache).GetProperty("TemplateInfo", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Edge.Settings.TemplateInfo>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Edge.Settings.TemplateInfo>>(options, info2);
properties[2].IsGetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.DateTime>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)obj).MountPointsInfo,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "MountPointsInfo",
JsonPropertyName = "MountPointsInfo",
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache).GetProperty("MountPointsInfo", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, global::System.DateTime>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::System.DateTime>>(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 TemplateCacheSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Version = ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)value).Version;
if (__value_Version is not null)
{
writer.WriteString(PropName_Version, __value_Version);
}
string __value_Locale = ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)value).Locale;
if (__value_Locale is not null)
{
writer.WriteString(PropName_Locale, __value_Locale);
}
global::System.Collections.Generic.IReadOnlyList<global::Microsoft.TemplateEngine.Edge.Settings.TemplateInfo> __value_TemplateInfo = ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)value).TemplateInfo;
if (__value_TemplateInfo is not null)
{
writer.WritePropertyName(PropName_TemplateInfo);
IReadOnlyListTemplateInfoSerializeHandler(writer, __value_TemplateInfo);
}
global::System.Collections.Generic.Dictionary<string, global::System.DateTime> __value_MountPointsInfo = ((global::Microsoft.TemplateEngine.Edge.Settings.TemplateCache)value).MountPointsInfo;
if (__value_MountPointsInfo is not null)
{
writer.WritePropertyName(PropName_MountPointsInfo);
DictionaryStringDateTimeSerializeHandler(writer, __value_MountPointsInfo);
}
writer.WriteEndObject();
}
}
}
|