|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.AspNetCore.StaticAssets
{
internal partial class StaticAssetsManifestJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>? _StaticAssetDescriptor;
/// <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.AspNetCore.StaticAssets.StaticAssetDescriptor> StaticAssetDescriptor
#nullable enable annotations
{
get => _StaticAssetDescriptor ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor> Create_StaticAssetDescriptor(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor(){ Route = (string)args[0], AssetPath = (string)args[1] },
PropertyMetadataInitializer = _ => StaticAssetDescriptorPropInit(options),
ConstructorParameterMetadataInitializer = StaticAssetDescriptorCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = StaticAssetDescriptorSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] StaticAssetDescriptorPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[5];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Route,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Route = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Route",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("Route", 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);
properties[0].IsRequired = true;
properties[0].IsGetNullable = false;
properties[0].IsSetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).AssetPath,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).AssetPath = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AssetPath",
JsonPropertyName = "AssetFile",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("AssetPath", 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].IsRequired = true;
properties[1].IsGetNullable = false;
properties[1].IsSetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetSelector>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Selectors,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Selectors = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Selectors",
JsonPropertyName = "Selectors",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("Selectors", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetSelector>), 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.AspNetCore.StaticAssets.StaticAssetSelector>>(options, info2);
properties[2].IsGetNullable = false;
properties[2].IsSetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetProperty>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Properties,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Properties = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Properties",
JsonPropertyName = "EndpointProperties",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetProperty>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetProperty>>(options, info3);
properties[3].IsGetNullable = false;
properties[3].IsSetNullable = false;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).ResponseHeaders,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).ResponseHeaders = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ResponseHeaders",
JsonPropertyName = "ResponseHeaders",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("ResponseHeaders", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>>(options, info4);
properties[4].IsGetNullable = false;
properties[4].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 StaticAssetDescriptorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_Route, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).Route);
writer.WriteString(PropName_AssetFile, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).AssetPath);
writer.WritePropertyName(PropName_Selectors);
IReadOnlyListStaticAssetSelectorSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).Selectors);
writer.WritePropertyName(PropName_EndpointProperties);
IReadOnlyListStaticAssetPropertySerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).Properties);
writer.WritePropertyName(PropName_ResponseHeaders);
IReadOnlyListStaticAssetResponseHeaderSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).ResponseHeaders);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] StaticAssetDescriptorCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Route",
ParameterType = typeof(string),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "AssetPath",
ParameterType = typeof(string),
Position = 1,
IsNullable = false,
IsMemberInitializer = true,
},
};
}
}
|