// <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.HotReload
{
internal sealed partial class StaticWebAssetsManifest
{
private sealed partial class StaticWebAssetsManifestJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson>? _ManifestJson;
/// <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.HotReload.StaticWebAssetsManifest.ManifestJson> ManifestJson
#nullable enable annotations
{
get => _ManifestJson ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson> Create_ManifestJson(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson(){ ContentRoots = (global::System.Collections.Generic.List<string>)args[0], Root = (global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson)args[1] },
PropertyMetadataInitializer = _ => ManifestJsonPropInit(options),
ConstructorParameterMetadataInitializer = ManifestJsonCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = ManifestJsonSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ManifestJsonPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[2];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson)obj).ContentRoots,
Setter = static (obj, value) => __set_ManifestJson_ContentRoots((global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ContentRoots",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson).GetProperty("ContentRoots", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<string>>(options, info0);
properties[0].IsRequired = true;
properties[0].IsGetNullable = false;
properties[0].IsSetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson)obj).Root,
Setter = static (obj, value) => __set_ManifestJson_Root((global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Root",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson).GetProperty("Root", InstanceMemberBindingFlags, null, typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson>(options, info1);
properties[1].IsRequired = true;
properties[1].IsGetNullable = false;
properties[1].IsSetNullable = 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 ManifestJsonSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::System.Collections.Generic.List<string> __value_ContentRoots = ((global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson)value).ContentRoots;
if (__value_ContentRoots is null)
{
ThrowPropertyNullException("ContentRoots");
}
writer.WritePropertyName(PropName_ContentRoots);
ListStringSerializeHandler(writer, __value_ContentRoots);
global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson __value_Root = ((global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson)value).Root;
if (__value_Root is null)
{
ThrowPropertyNullException("Root");
}
writer.WritePropertyName(PropName_Root);
ChildAssetJsonSerializeHandler(writer, __value_Root);
writer.WriteEndObject();
static void ThrowPropertyNullException(string propertyName)
{
throw new global::System.Text.Json.JsonException(string.Format("The property or field '{0}' on type '{1}' doesn't allow getting null values. Consider updating its nullability annotation.", propertyName, "ManifestJson"));
}
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ManifestJsonCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "ContentRoots",
ParameterType = typeof(global::System.Collections.Generic.List<string>),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "Root",
ParameterType = typeof(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson),
Position = 1,
IsNullable = false,
IsMemberInitializer = true,
},
};
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ContentRoots")]
private static extern void __set_ManifestJson_ContentRoots(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson obj, global::System.Collections.Generic.List<string> value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Root")]
private static extern void __set_ManifestJson_Root(global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ManifestJson obj, global::Microsoft.DotNet.HotReload.StaticWebAssetsManifest.ChildAssetJson value);
}
}
}