|
// <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.Components.Endpoints
{
internal partial class BrowserOptionsJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.BrowserOptions>? _BrowserOptions;
/// <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.Components.BrowserOptions> BrowserOptions
#nullable enable annotations
{
get => _BrowserOptions ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.BrowserOptions>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.BrowserOptions));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.BrowserOptions> Create_BrowserOptions(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.BrowserOptions>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.BrowserOptions> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.BrowserOptions>
{
ObjectCreator = () => new global::Microsoft.AspNetCore.Components.BrowserOptions(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => BrowserOptionsPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.BrowserOptions).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = BrowserOptionsSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.BrowserOptions>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] BrowserOptionsPropInit(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::Microsoft.Extensions.Logging.LogLevel?>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.BrowserOptions),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.BrowserOptions)obj).LogLevel,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Components.BrowserOptions)obj).LogLevel = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "LogLevel",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.BrowserOptions).GetProperty("LogLevel", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.Logging.LogLevel?), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.Logging.LogLevel?>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Components.WebAssemblyBrowserOptions>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.BrowserOptions),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.BrowserOptions)obj).WebAssembly,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "WebAssembly",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.BrowserOptions).GetProperty("WebAssembly", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Components.WebAssemblyBrowserOptions), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Components.WebAssemblyBrowserOptions>(options, info1);
properties[1].IsGetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Components.InteractiveServerBrowserOptions>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.BrowserOptions),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.BrowserOptions)obj).Server,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Server",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.BrowserOptions).GetProperty("Server", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Components.InteractiveServerBrowserOptions), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Components.InteractiveServerBrowserOptions>(options, info2);
properties[2].IsGetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Components.SsrBrowserOptions>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.BrowserOptions),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.BrowserOptions)obj).Ssr,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Ssr",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.BrowserOptions).GetProperty("Ssr", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Components.SsrBrowserOptions), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Components.SsrBrowserOptions>(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 BrowserOptionsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.BrowserOptions? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::Microsoft.Extensions.Logging.LogLevel? __value_LogLevel = ((global::Microsoft.AspNetCore.Components.BrowserOptions)value).LogLevel;
if (__value_LogLevel is not null)
{
writer.WritePropertyName(PropName_logLevel);
global::System.Text.Json.JsonSerializer.Serialize(writer, __value_LogLevel, NullableLogLevel);
}
global::Microsoft.AspNetCore.Components.WebAssemblyBrowserOptions __value_WebAssembly = ((global::Microsoft.AspNetCore.Components.BrowserOptions)value).WebAssembly;
if (__value_WebAssembly is not null)
{
writer.WritePropertyName(PropName_webAssembly);
WebAssemblyBrowserOptionsSerializeHandler(writer, __value_WebAssembly);
}
global::Microsoft.AspNetCore.Components.InteractiveServerBrowserOptions __value_Server = ((global::Microsoft.AspNetCore.Components.BrowserOptions)value).Server;
if (__value_Server is not null)
{
writer.WritePropertyName(PropName_server);
global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Server, InteractiveServerBrowserOptions);
}
global::Microsoft.AspNetCore.Components.SsrBrowserOptions __value_Ssr = ((global::Microsoft.AspNetCore.Components.BrowserOptions)value).Ssr;
if (__value_Ssr is not null)
{
writer.WritePropertyName(PropName_ssr);
global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Ssr, SsrBrowserOptions);
}
writer.WriteEndObject();
}
}
}
|