|
// <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.SetCredentialsRequest>? _SetCredentialsRequest;
/// <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.SetCredentialsRequest> SetCredentialsRequest
#nullable enable annotations
{
get => _SetCredentialsRequest ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.SetCredentialsRequest>)Options.GetTypeInfo(typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.SetCredentialsRequest> Create_SetCredentialsRequest(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Protocol.Plugins.SetCredentialsRequest>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.SetCredentialsRequest> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Protocol.Plugins.SetCredentialsRequest>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Protocol.Plugins.SetCredentialsRequest((string)args[0], (string)args[1], (string)args[2], (string)args[3], (string)args[4]),
PropertyMetadataInitializer = _ => SetCredentialsRequestPropInit(options),
ConstructorParameterMetadataInitializer = SetCredentialsRequestCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(string), typeof(string)}, modifiers: null),
SerializeHandler = SetCredentialsRequestSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Protocol.Plugins.SetCredentialsRequest>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] SetCredentialsRequestPropInit(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::NuGet.Protocol.Plugins.SetCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)obj).PackageSourceRepository,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "PackageSourceRepository",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest).GetProperty("PackageSourceRepository", 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::NuGet.Protocol.Plugins.SetCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)obj).Password,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Password",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest).GetProperty("Password", 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::NuGet.Protocol.Plugins.SetCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)obj).ProxyPassword,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ProxyPassword",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest).GetProperty("ProxyPassword", 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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)obj).ProxyUsername,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ProxyUsername",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest).GetProperty("ProxyUsername", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest),
Converter = null,
Getter = static obj => ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)obj).Username,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Username",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.SetCredentialsRequest).GetProperty("Username", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info4);
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 SetCredentialsRequestSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.Protocol.Plugins.SetCredentialsRequest? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_PackageSourceRepository = ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)value).PackageSourceRepository;
if (__value_PackageSourceRepository is not null)
{
writer.WriteString(PropName_PackageSourceRepository, __value_PackageSourceRepository);
}
string __value_Password = ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)value).Password;
if (__value_Password is not null)
{
writer.WriteString(PropName_Password, __value_Password);
}
string __value_ProxyPassword = ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)value).ProxyPassword;
if (__value_ProxyPassword is not null)
{
writer.WriteString(PropName_ProxyPassword, __value_ProxyPassword);
}
string __value_ProxyUsername = ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)value).ProxyUsername;
if (__value_ProxyUsername is not null)
{
writer.WriteString(PropName_ProxyUsername, __value_ProxyUsername);
}
string __value_Username = ((global::NuGet.Protocol.Plugins.SetCredentialsRequest)value).Username;
if (__value_Username is not null)
{
writer.WriteString(PropName_Username, __value_Username);
}
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] SetCredentialsRequestCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "packageSourceRepository",
ParameterType = typeof(string),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "proxyUsername",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "proxyPassword",
ParameterType = typeof(string),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "username",
ParameterType = typeof(string),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "password",
ParameterType = typeof(string),
Position = 4,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
};
}
}
|