|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace NuGet.Protocol.Plugins
{
internal partial class PluginJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest>? _GetAuthenticationCredentialsRequest;
/// <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::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest> GetAuthenticationCredentialsRequest
#nullable enable annotations
{
get => _GetAuthenticationCredentialsRequest ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest>)Options.GetTypeInfo(typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest> Create_GetAuthenticationCredentialsRequest(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest((global::System.Uri)args[0], (bool)args[1], (bool)args[2], (bool)args[3]),
PropertyMetadataInitializer = _ => GetAuthenticationCredentialsRequestPropInit(options),
ConstructorParameterMetadataInitializer = GetAuthenticationCredentialsRequestCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(bool), typeof(bool), typeof(bool)}, modifiers: null),
SerializeHandler = GetAuthenticationCredentialsRequestSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] GetAuthenticationCredentialsRequestPropInit(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::System.Uri>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)obj).Uri,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Uri",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)obj).IsRetry,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsRetry",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetProperty("IsRetry", 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<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)obj).IsNonInteractive,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsNonInteractive",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetProperty("IsNonInteractive", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)obj).CanShowDialog,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "CanShowDialog",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetProperty("CanShowDialog", 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);
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 GetAuthenticationCredentialsRequestSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::System.Uri __value_Uri = ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)value).Uri;
if (__value_Uri is not null)
{
writer.WritePropertyName(PropName_Uri);
global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Uri, Uri);
}
writer.WriteBoolean(PropName_IsRetry, ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)value).IsRetry);
writer.WriteBoolean(PropName_IsNonInteractive, ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)value).IsNonInteractive);
writer.WriteBoolean(PropName_CanShowDialog, ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)value).CanShowDialog);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] GetAuthenticationCredentialsRequestCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "uri",
ParameterType = typeof(global::System.Uri),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "isRetry",
ParameterType = typeof(bool),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "isNonInteractive",
ParameterType = typeof(bool),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "canShowDialog",
ParameterType = typeof(bool),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
};
}
}
|