|
// <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.Identity.Data
{
internal sealed partial class IdentityEndpointsJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>? _TwoFactorResponse;
/// <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.Identity.Data.TwoFactorResponse> TwoFactorResponse
#nullable enable annotations
{
get => _TwoFactorResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse> Create_TwoFactorResponse(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse(){ SharedKey = (string)args[0], RecoveryCodesLeft = (int)args[1], RecoveryCodes = (string[])args[2], IsTwoFactorEnabled = (bool)args[3], IsMachineRemembered = (bool)args[4] },
PropertyMetadataInitializer = _ => TwoFactorResponsePropInit(options),
ConstructorParameterMetadataInitializer = TwoFactorResponseCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = TwoFactorResponseSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] TwoFactorResponsePropInit(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.Identity.Data.TwoFactorResponse),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).SharedKey,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "SharedKey",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("SharedKey", 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<int>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).RecoveryCodesLeft,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "RecoveryCodesLeft",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("RecoveryCodesLeft", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info1);
properties[1].IsRequired = true;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string[]>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).RecoveryCodes,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "RecoveryCodes",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("RecoveryCodes", InstanceMemberBindingFlags, null, typeof(string[]), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string[]>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).IsTwoFactorEnabled,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsTwoFactorEnabled",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("IsTwoFactorEnabled", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info3);
properties[3].IsRequired = true;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).IsMachineRemembered,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsMachineRemembered",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("IsMachineRemembered", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info4);
properties[4].IsRequired = true;
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 TwoFactorResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_SharedKey, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).SharedKey);
writer.WriteNumber(PropName_RecoveryCodesLeft, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).RecoveryCodesLeft);
writer.WritePropertyName(PropName_RecoveryCodes);
StringArraySerializeHandler(writer, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).RecoveryCodes);
writer.WriteBoolean(PropName_IsTwoFactorEnabled, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).IsTwoFactorEnabled);
writer.WriteBoolean(PropName_IsMachineRemembered, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).IsMachineRemembered);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] TwoFactorResponseCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "SharedKey",
ParameterType = typeof(string),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "RecoveryCodesLeft",
ParameterType = typeof(int),
Position = 1,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "RecoveryCodes",
ParameterType = typeof(string[]),
Position = 2,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "IsTwoFactorEnabled",
ParameterType = typeof(bool),
Position = 3,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "IsMachineRemembered",
ParameterType = typeof(bool),
Position = 4,
IsNullable = false,
IsMemberInitializer = true,
},
};
}
}
|