|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Cli
{
internal partial class JsonSourceGenerationContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Certificates.DevCertInfo>? _DevCertInfo;
/// <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::Aspire.Cli.Certificates.DevCertInfo> DevCertInfo
#nullable enable annotations
{
get => _DevCertInfo ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Certificates.DevCertInfo>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Certificates.DevCertInfo));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Certificates.DevCertInfo> Create_DevCertInfo(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Certificates.DevCertInfo>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Certificates.DevCertInfo> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Certificates.DevCertInfo>
{
ObjectCreator = () => new global::Aspire.Cli.Certificates.DevCertInfo(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => DevCertInfoPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = DevCertInfoSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Certificates.DevCertInfo>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] DevCertInfoPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[9];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).Thumbprint,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).Thumbprint = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Thumbprint",
JsonPropertyName = "Thumbprint",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("Thumbprint", 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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).Subject,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).Subject = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Subject",
JsonPropertyName = "Subject",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("Subject", 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);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string[]>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).SubjectAlternativeNames,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).SubjectAlternativeNames = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "SubjectAlternativeNames",
JsonPropertyName = "X509SubjectAlternativeNameExtension",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("SubjectAlternativeNames", 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<int>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).Version,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).Version = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Version",
JsonPropertyName = "Version",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).ValidityNotBefore,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).ValidityNotBefore = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ValidityNotBefore",
JsonPropertyName = "ValidityNotBefore",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("ValidityNotBefore", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info4);
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).ValidityNotAfter,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).ValidityNotAfter = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ValidityNotAfter",
JsonPropertyName = "ValidityNotAfter",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("ValidityNotAfter", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).IsHttpsDevelopmentCertificate,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).IsHttpsDevelopmentCertificate = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsHttpsDevelopmentCertificate",
JsonPropertyName = "IsHttpsDevelopmentCertificate",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("IsHttpsDevelopmentCertificate", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).IsExportable,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).IsExportable = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsExportable",
JsonPropertyName = "IsExportable",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("IsExportable", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Certificates.DevCertInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).TrustLevel,
Setter = static (obj, value) => ((global::Aspire.Cli.Certificates.DevCertInfo)obj).TrustLevel = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "TrustLevel",
JsonPropertyName = "TrustLevel",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Certificates.DevCertInfo).GetProperty("TrustLevel", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info8);
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 DevCertInfoSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Certificates.DevCertInfo? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Thumbprint = ((global::Aspire.Cli.Certificates.DevCertInfo)value).Thumbprint;
if (__value_Thumbprint is not null)
{
writer.WriteString(PropName_Thumbprint, __value_Thumbprint);
}
string __value_Subject = ((global::Aspire.Cli.Certificates.DevCertInfo)value).Subject;
if (__value_Subject is not null)
{
writer.WriteString(PropName_Subject, __value_Subject);
}
string[] __value_SubjectAlternativeNames = ((global::Aspire.Cli.Certificates.DevCertInfo)value).SubjectAlternativeNames;
if (__value_SubjectAlternativeNames is not null)
{
writer.WritePropertyName(PropName_X509SubjectAlternativeNameExtension);
StringArraySerializeHandler(writer, __value_SubjectAlternativeNames);
}
writer.WriteNumber(PropName_Version, ((global::Aspire.Cli.Certificates.DevCertInfo)value).Version);
writer.WriteString(PropName_ValidityNotBefore, ((global::Aspire.Cli.Certificates.DevCertInfo)value).ValidityNotBefore);
writer.WriteString(PropName_ValidityNotAfter, ((global::Aspire.Cli.Certificates.DevCertInfo)value).ValidityNotAfter);
writer.WriteBoolean(PropName_IsHttpsDevelopmentCertificate, ((global::Aspire.Cli.Certificates.DevCertInfo)value).IsHttpsDevelopmentCertificate);
writer.WriteBoolean(PropName_IsExportable, ((global::Aspire.Cli.Certificates.DevCertInfo)value).IsExportable);
string __value_TrustLevel = ((global::Aspire.Cli.Certificates.DevCertInfo)value).TrustLevel;
if (__value_TrustLevel is not null)
{
writer.WriteString(PropName_TrustLevel, __value_TrustLevel);
}
writer.WriteEndObject();
}
}
}
|