// <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.InternalMicrosoft
{
internal sealed partial class InternalMicrosoftDetectorJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry>? _InternalMicrosoftDetectorCacheEntry;
/// <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.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry> InternalMicrosoftDetectorCacheEntry
#nullable enable annotations
{
get => _InternalMicrosoftDetectorCacheEntry ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry> Create_InternalMicrosoftDetectorCacheEntry(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry((int)args[0], (bool)args[1], (string)args[2], (string)args[3], (string)args[4], (bool)args[5], (global::System.DateTimeOffset)args[6]),
PropertyMetadataInitializer = _ => InternalMicrosoftDetectorCacheEntryPropInit(options),
ConstructorParameterMetadataInitializer = InternalMicrosoftDetectorCacheEntryCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(int), typeof(bool), typeof(string), typeof(string), typeof(string), typeof(bool), typeof(global::System.DateTimeOffset)}, modifiers: null),
SerializeHandler = InternalMicrosoftDetectorCacheEntrySerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] InternalMicrosoftDetectorCacheEntryPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[7];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).Version,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_Version((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Version",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).IsInternalMicrosoft,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_IsInternalMicrosoft((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsInternalMicrosoft",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("IsInternalMicrosoft", 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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).Source,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_Source((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Source",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("Source", 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::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).Alias,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_Alias((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Alias",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("Alias", 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::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).Domain,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_Domain((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Domain",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("Domain", 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<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).IsCIEnvironment,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_IsCIEnvironment((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsCIEnvironment",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("IsCIEnvironment", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj).TimestampUtc,
Setter = static (obj, value) => __set_InternalMicrosoftDetectorCacheEntry_TimestampUtc((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "TimestampUtc",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry).GetProperty("TimestampUtc", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info6);
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 InternalMicrosoftDetectorCacheEntrySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteNumber(PropName_Version, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).Version);
writer.WriteBoolean(PropName_IsInternalMicrosoft, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).IsInternalMicrosoft);
writer.WriteString(PropName_Source, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).Source);
writer.WriteString(PropName_Alias, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).Alias);
writer.WriteString(PropName_Domain, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).Domain);
writer.WriteBoolean(PropName_IsCIEnvironment, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).IsCIEnvironment);
writer.WriteString(PropName_TimestampUtc, ((global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry)value).TimestampUtc);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] InternalMicrosoftDetectorCacheEntryCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Version",
ParameterType = typeof(int),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "IsInternalMicrosoft",
ParameterType = typeof(bool),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "Source",
ParameterType = typeof(string),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "Alias",
ParameterType = typeof(string),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "Domain",
ParameterType = typeof(string),
Position = 4,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "IsCIEnvironment",
ParameterType = typeof(bool),
Position = 5,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "TimestampUtc",
ParameterType = typeof(global::System.DateTimeOffset),
Position = 6,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
};
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Version")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_Version(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, int value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_IsInternalMicrosoft")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_IsInternalMicrosoft(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, bool value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Source")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_Source(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Alias")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_Alias(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Domain")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_Domain(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_IsCIEnvironment")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_IsCIEnvironment(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, bool value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_TimestampUtc")]
private static extern void __set_InternalMicrosoftDetectorCacheEntry_TimestampUtc(global::Microsoft.DotNet.Cli.InternalMicrosoft.InternalMicrosoftDetectorCacheEntry obj, global::System.DateTimeOffset value);
}
}