|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Cli
{
internal partial class JsonSourceGenerationContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.Docs.LlmsDocument>? _LlmsDocument;
/// <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::Aspire.Cli.Mcp.Docs.LlmsDocument> LlmsDocument
#nullable enable annotations
{
get => _LlmsDocument ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.Docs.LlmsDocument>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.Docs.LlmsDocument> Create_LlmsDocument(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Mcp.Docs.LlmsDocument>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.Docs.LlmsDocument> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Mcp.Docs.LlmsDocument>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Mcp.Docs.LlmsDocument(){ Title = (string)args[0], Slug = (string)args[1], Summary = (string)args[2], Content = (string)args[3], Sections = (global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Mcp.Docs.LlmsSection>)args[4] },
PropertyMetadataInitializer = _ => LlmsDocumentPropInit(options),
ConstructorParameterMetadataInitializer = LlmsDocumentCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = LlmsDocumentSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Mcp.Docs.LlmsDocument>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] LlmsDocumentPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[5];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)obj).Title,
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 = "Title",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument).GetProperty("Title", 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::Aspire.Cli.Mcp.Docs.LlmsDocument),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)obj).Slug,
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 = "Slug",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument).GetProperty("Slug", 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);
properties[1].IsRequired = true;
properties[1].IsGetNullable = false;
properties[1].IsSetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)obj).Summary,
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 = "Summary",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument).GetProperty("Summary", 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::Aspire.Cli.Mcp.Docs.LlmsDocument),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)obj).Content,
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 = "Content",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument).GetProperty("Content", 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);
properties[3].IsRequired = true;
properties[3].IsGetNullable = false;
properties[3].IsSetNullable = false;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Mcp.Docs.LlmsSection>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)obj).Sections,
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 = "Sections",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.Docs.LlmsDocument).GetProperty("Sections", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Mcp.Docs.LlmsSection>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Mcp.Docs.LlmsSection>>(options, info4);
properties[4].IsRequired = true;
properties[4].IsGetNullable = false;
properties[4].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 LlmsDocumentSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Mcp.Docs.LlmsDocument? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Title = ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)value).Title;
if (__value_Title is not null)
{
writer.WriteString(PropName_Title, __value_Title);
}
string __value_Slug = ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)value).Slug;
if (__value_Slug is not null)
{
writer.WriteString(PropName_Slug, __value_Slug);
}
string __value_Summary = ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)value).Summary;
if (__value_Summary is not null)
{
writer.WriteString(PropName_Summary, __value_Summary);
}
string __value_Content = ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)value).Content;
if (__value_Content is not null)
{
writer.WriteString(PropName_Content, __value_Content);
}
global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Mcp.Docs.LlmsSection> __value_Sections = ((global::Aspire.Cli.Mcp.Docs.LlmsDocument)value).Sections;
if (__value_Sections is not null)
{
writer.WritePropertyName(PropName_Sections);
IReadOnlyListLlmsSectionSerializeHandler(writer, __value_Sections);
}
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] LlmsDocumentCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Title",
ParameterType = typeof(string),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "Slug",
ParameterType = typeof(string),
Position = 1,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "Summary",
ParameterType = typeof(string),
Position = 2,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "Content",
ParameterType = typeof(string),
Position = 3,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "Sections",
ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Mcp.Docs.LlmsSection>),
Position = 4,
IsNullable = false,
IsMemberInitializer = true,
},
};
}
}
|