|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Dashboard.Mcp
{
public sealed partial class McpConfigFileModelContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel>? _McpJsonFileServerModel;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel> McpJsonFileServerModel
{
get => _McpJsonFileServerModel ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel>)Options.GetTypeInfo(typeof(global::Aspire.Dashboard.Mcp.McpJsonFileServerModel));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel> Create_McpJsonFileServerModel(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Dashboard.Mcp.McpJsonFileServerModel(){ Servers = (global::System.Collections.Generic.Dictionary<string, global::Aspire.Dashboard.Mcp.McpJsonFileServerInstanceModel>)args[0] },
PropertyMetadataInitializer = _ => McpJsonFileServerModelPropInit(options),
ConstructorParameterMetadataInitializer = McpJsonFileServerModelCtorParamInit,
SerializeHandler = McpJsonFileServerModelSerializeHandler
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Dashboard.Mcp.McpJsonFileServerModel>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] McpJsonFileServerModelPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[1];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Dashboard.Mcp.McpJsonFileServerInstanceModel>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Dashboard.Mcp.McpJsonFileServerModel),
Converter = null,
Getter = static obj => ((global::Aspire.Dashboard.Mcp.McpJsonFileServerModel)obj).Servers,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Servers",
JsonPropertyName = null
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Dashboard.Mcp.McpJsonFileServerInstanceModel>>(options, info0);
properties[0].IsRequired = true;
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 McpJsonFileServerModelSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Dashboard.Mcp.McpJsonFileServerModel? value)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::System.Collections.Generic.Dictionary<string, global::Aspire.Dashboard.Mcp.McpJsonFileServerInstanceModel> __value_Servers = ((global::Aspire.Dashboard.Mcp.McpJsonFileServerModel)value).Servers;
if (__value_Servers != null)
{
writer.WritePropertyName(PropName_servers);
DictionaryStringMcpJsonFileServerInstanceModelSerializeHandler(writer, __value_Servers);
}
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] McpJsonFileServerModelCtorParamInit()
{
var parameters = new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[1];
parameters[0] = new()
{
Name = "Servers",
ParameterType = typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Dashboard.Mcp.McpJsonFileServerInstanceModel>),
Position = 0,
};
return parameters;
}
}
}
|