|
// <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.Cli.Telemetry
{
internal partial class TelemetryDiskLoggerJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel>? _SourceModel;
/// <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.Cli.Telemetry.TelemetryDiskLogger.SourceModel> SourceModel
#nullable enable annotations
{
get => _SourceModel ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel> Create_SourceModel(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel((string)args[0], (string)args[1], (global::System.Collections.Generic.Dictionary<string, object>)args[2]),
PropertyMetadataInitializer = _ => SourceModelPropInit(options),
ConstructorParameterMetadataInitializer = SourceModelCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(global::System.Collections.Generic.Dictionary<string, object>)}, modifiers: null),
SerializeHandler = SourceModelSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] SourceModelPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[3];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)obj).name,
Setter = static (obj, value) => __set_SourceModel_name((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "name",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel).GetProperty("name", 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].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.Cli.Telemetry.TelemetryDiskLogger.SourceModel),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)obj).version,
Setter = static (obj, value) => __set_SourceModel_version((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "version",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel).GetProperty("version", 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<global::System.Collections.Generic.Dictionary<string, object>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)obj).tags,
Setter = static (obj, value) => __set_SourceModel_tags((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "tags",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel).GetProperty("tags", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, object>>(options, info2);
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 SourceModelSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_name, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)value).name);
writer.WriteString(PropName_version, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)value).version);
writer.WritePropertyName(PropName_tags);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel)value).tags, DictionaryStringObject);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] SourceModelCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "name",
ParameterType = typeof(string),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "version",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "tags",
ParameterType = typeof(global::System.Collections.Generic.Dictionary<string, object>),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
};
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_name")]
private static extern void __set_SourceModel_name(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_version")]
private static extern void __set_SourceModel_version(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_tags")]
private static extern void __set_SourceModel_tags(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.SourceModel obj, global::System.Collections.Generic.Dictionary<string, object> value);
}
}
|