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