|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.DotNet.ProjectTools
{
internal partial class LaunchProfileJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile>? _ExecutableLaunchProfile;
/// <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.DotNet.ProjectTools.ExecutableLaunchProfile> ExecutableLaunchProfile
#nullable enable annotations
{
get => _ExecutableLaunchProfile ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile> Create_ExecutableLaunchProfile(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile(){ ExecutablePath = (string)args[0] },
PropertyMetadataInitializer = _ => ExecutableLaunchProfilePropInit(options),
ConstructorParameterMetadataInitializer = ExecutableLaunchProfileCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = ExecutableLaunchProfileSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ExecutableLaunchProfilePropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[6];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile)obj).ExecutablePath,
Setter = static (obj, value) => __set_ExecutableLaunchProfile_ExecutablePath((global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ExecutablePath",
JsonPropertyName = "executablePath",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile).GetProperty("ExecutablePath", 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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile)obj).WorkingDirectory,
Setter = static (obj, value) => __set_ExecutableLaunchProfile_WorkingDirectory((global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "WorkingDirectory",
JsonPropertyName = "workingDirectory",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile).GetProperty("WorkingDirectory", 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::Microsoft.DotNet.ProjectTools.LaunchProfile),
Converter = null,
Getter = null,
Setter = null,
IgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.Always,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "LaunchProfileName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("LaunchProfileName", 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.DotNet.ProjectTools.LaunchProfile),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj).DotNetRunMessages,
Setter = static (obj, value) => __set_ExecutableLaunchProfile_DotNetRunMessages((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DotNetRunMessages",
JsonPropertyName = "dotnetRunMessages",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("DotNetRunMessages", 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);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj).CommandLineArgs,
Setter = static (obj, value) => __set_ExecutableLaunchProfile_CommandLineArgs((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "CommandLineArgs",
JsonPropertyName = "commandLineArgs",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("CommandLineArgs", 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);
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableDictionary<string, string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj).EnvironmentVariables,
Setter = static (obj, value) => __set_ExecutableLaunchProfile_EnvironmentVariables((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "EnvironmentVariables",
JsonPropertyName = "environmentVariables",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("EnvironmentVariables", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Immutable.ImmutableDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>>(options, info5);
properties[5].IsGetNullable = false;
properties[5].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 ExecutableLaunchProfileSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_executablePath, ((global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile)value).ExecutablePath);
writer.WriteString(PropName_workingDirectory, ((global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile)value).WorkingDirectory);
writer.WriteBoolean(PropName_dotnetRunMessages, ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)value).DotNetRunMessages);
writer.WriteString(PropName_commandLineArgs, ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)value).CommandLineArgs);
writer.WritePropertyName(PropName_environmentVariables);
ImmutableDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)value).EnvironmentVariables);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ExecutableLaunchProfileCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "ExecutablePath",
ParameterType = typeof(string),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
};
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ExecutablePath")]
private static extern void __set_ExecutableLaunchProfile_ExecutablePath(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_WorkingDirectory")]
private static extern void __set_ExecutableLaunchProfile_WorkingDirectory(global::Microsoft.DotNet.ProjectTools.ExecutableLaunchProfile obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_DotNetRunMessages")]
private static extern void __set_ExecutableLaunchProfile_DotNetRunMessages(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, bool value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_CommandLineArgs")]
private static extern void __set_ExecutableLaunchProfile_CommandLineArgs(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_EnvironmentVariables")]
private static extern void __set_ExecutableLaunchProfile_EnvironmentVariables(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, global::System.Collections.Immutable.ImmutableDictionary<string, string> value);
}
}
|