// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
// Suppress warnings about [Experimental] member usage in generated code.
#pragma warning disable ASP0031
namespace Microsoft.AspNetCore.Authentication.DeviceBoundSessions
{
internal sealed partial class DeviceBoundSessionJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope>? _SessionScope;
/// <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.Authentication.DeviceBoundSessions.SessionScope> SessionScope
#nullable enable annotations
{
get => _SessionScope ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope> Create_SessionScope(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope>
{
ObjectCreator = () => new global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => SessionScopePropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = SessionScopeSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] SessionScopePropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[3];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)obj).Origin,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)obj).Origin = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Origin",
JsonPropertyName = "origin",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope).GetProperty("Origin", 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<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)obj).IncludeSite,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)obj).IncludeSite = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IncludeSite",
JsonPropertyName = "include_site",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope).GetProperty("IncludeSite", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info1);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScopeRule>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)obj).ScopeSpecification,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)obj).ScopeSpecification = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ScopeSpecification",
JsonPropertyName = "scope_specification",
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope).GetProperty("ScopeSpecification", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScopeRule>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScopeRule>>(options, info2);
properties[2].IsGetNullable = false;
properties[2].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 SessionScopeSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Origin = ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)value).Origin;
if (__value_Origin is not null)
{
writer.WriteString(PropName_origin, __value_Origin);
}
writer.WriteBoolean(PropName_include_site, ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)value).IncludeSite);
global::System.Collections.Generic.List<global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScopeRule> __value_ScopeSpecification = ((global::Microsoft.AspNetCore.Authentication.DeviceBoundSessions.SessionScope)value).ScopeSpecification;
if (__value_ScopeSpecification is not null)
{
writer.WritePropertyName(PropName_scope_specification);
ListSessionScopeRuleSerializeHandler(writer, __value_ScopeSpecification);
}
writer.WriteEndObject();
}
}
}