|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.TemplateEngine.Edge.Settings
{
internal partial class TemplateCacheJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter>? _ITemplateParameter;
/// <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.TemplateEngine.Abstractions.ITemplateParameter> ITemplateParameter
#nullable enable annotations
{
get => _ITemplateParameter ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter>)Options.GetTypeInfo(typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter> Create_ITemplateParameter(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => ITemplateParameterPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = null,
SerializeHandler = ITemplateParameterSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ITemplateParameterPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[13];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Documentation,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Documentation",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Documentation", 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 = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Description,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Description",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Description", 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 = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Name,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Name",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Name", 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);
properties[2].IsGetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPriority>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Priority,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Priority",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Priority", InstanceMemberBindingFlags, null, typeof(global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPriority), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPriority>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPrecedence>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Precedence,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Precedence",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Precedence", InstanceMemberBindingFlags, null, typeof(global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPrecedence), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPrecedence>(options, info4);
properties[4].IsGetNullable = false;
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Type,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Type",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Type", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info5);
properties[5].IsGetNullable = false;
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).IsName,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("IsName", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).DefaultValue,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DefaultValue",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("DefaultValue", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).DataType,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DataType",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("DataType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info8);
properties[8].IsGetNullable = false;
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyDictionary<string, global::Microsoft.TemplateEngine.Abstractions.ParameterChoice>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).Choices,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Choices",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("Choices", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, global::Microsoft.TemplateEngine.Abstractions.ParameterChoice>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyDictionary<string, global::Microsoft.TemplateEngine.Abstractions.ParameterChoice>>(options, info9);
var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).DisplayName,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DisplayName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("DisplayName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info10);
var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).AllowMultipleValues,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AllowMultipleValues",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("AllowMultipleValues", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info11);
var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = true,
DeclaringType = typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter),
Converter = null,
Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)obj).DefaultIfOptionWithoutValue,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DefaultIfOptionWithoutValue",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter).GetProperty("DefaultIfOptionWithoutValue", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info12);
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 ITemplateParameterSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Documentation = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Documentation;
if (__value_Documentation is not null)
{
writer.WriteString(PropName_Documentation, __value_Documentation);
}
string __value_Description = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Description;
if (__value_Description is not null)
{
writer.WriteString(PropName_Description, __value_Description);
}
string __value_Name = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Name;
if (__value_Name is not null)
{
writer.WriteString(PropName_Name, __value_Name);
}
writer.WritePropertyName(PropName_Priority);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Priority, TemplateParameterPriority);
global::Microsoft.TemplateEngine.Abstractions.TemplateParameterPrecedence __value_Precedence = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Precedence;
if (__value_Precedence is not null)
{
writer.WritePropertyName(PropName_Precedence);
TemplateParameterPrecedenceSerializeHandler(writer, __value_Precedence);
}
string __value_Type = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Type;
if (__value_Type is not null)
{
writer.WriteString(PropName_Type, __value_Type);
}
writer.WriteBoolean(PropName_IsName, ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).IsName);
string __value_DefaultValue = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).DefaultValue;
if (__value_DefaultValue is not null)
{
writer.WriteString(PropName_DefaultValue, __value_DefaultValue);
}
string __value_DataType = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).DataType;
if (__value_DataType is not null)
{
writer.WriteString(PropName_DataType, __value_DataType);
}
global::System.Collections.Generic.IReadOnlyDictionary<string, global::Microsoft.TemplateEngine.Abstractions.ParameterChoice> __value_Choices = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).Choices;
if (__value_Choices is not null)
{
writer.WritePropertyName(PropName_Choices);
IReadOnlyDictionaryStringParameterChoiceSerializeHandler(writer, __value_Choices);
}
string __value_DisplayName = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).DisplayName;
if (__value_DisplayName is not null)
{
writer.WriteString(PropName_DisplayName, __value_DisplayName);
}
writer.WriteBoolean(PropName_AllowMultipleValues, ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).AllowMultipleValues);
string __value_DefaultIfOptionWithoutValue = ((global::Microsoft.TemplateEngine.Abstractions.ITemplateParameter)value).DefaultIfOptionWithoutValue;
if (__value_DefaultIfOptionWithoutValue is not null)
{
writer.WriteString(PropName_DefaultIfOptionWithoutValue, __value_DefaultIfOptionWithoutValue);
}
writer.WriteEndObject();
}
}
}
|