File: _generated\10\SettingsStoreJsonSerializerContext.SettingsStore.g.cs
Web Access
Project: src\src\sdk\src\TemplateEngine\Microsoft.TemplateEngine.Edge\Microsoft.TemplateEngine.Edge.csproj (Microsoft.TemplateEngine.Edge)
// <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 SettingsStoreJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore>? _SettingsStore;
        
        /// <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.Edge.Settings.SettingsStore> SettingsStore
        #nullable enable annotations
        {
            get => _SettingsStore ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore>)Options.GetTypeInfo(typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore> Create_SettingsStore(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => SettingsStorePropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = null,
                    SerializeHandler = SettingsStoreSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] SettingsStorePropInit(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<global::System.Collections.Generic.Dictionary<string, string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore),
                Converter = null,
                Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)obj).ComponentGuidToAssemblyQualifiedName,
                Setter = static (obj, value) => __set_SettingsStore_ComponentGuidToAssemblyQualifiedName((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = true,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ComponentGuidToAssemblyQualifiedName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore).GetProperty("ComponentGuidToAssemblyQualifiedName", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info0);
            properties[0].IsGetNullable = false;

            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.HashSet<string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore),
                Converter = null,
                Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)obj).ProbingPaths,
                Setter = static (obj, value) => __set_SettingsStore_ProbingPaths((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = true,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ProbingPaths",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore).GetProperty("ProbingPaths", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.HashSet<string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.HashSet<string>>(options, info1);
            properties[1].IsGetNullable = false;

            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<global::System.Guid>>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore),
                Converter = null,
                Getter = static obj => ((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)obj).ComponentTypeToGuidList,
                Setter = static (obj, value) => __set_SettingsStore_ComponentTypeToGuidList((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = true,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ComponentTypeToGuidList",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore).GetProperty("ComponentTypeToGuidList", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<global::System.Guid>>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<global::System.Guid>>>(options, info2);
            properties[2].IsGetNullable = 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 SettingsStoreSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();

            global::System.Collections.Generic.Dictionary<string, string> __value_ComponentGuidToAssemblyQualifiedName = ((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)value).ComponentGuidToAssemblyQualifiedName;
            if (__value_ComponentGuidToAssemblyQualifiedName is not null)
            {
                writer.WritePropertyName(PropName_ComponentGuidToAssemblyQualifiedName);
                DictionaryStringStringSerializeHandler(writer, __value_ComponentGuidToAssemblyQualifiedName);
            }
            global::System.Collections.Generic.HashSet<string> __value_ProbingPaths = ((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)value).ProbingPaths;
            if (__value_ProbingPaths is not null)
            {
                writer.WritePropertyName(PropName_ProbingPaths);
                HashSetStringSerializeHandler(writer, __value_ProbingPaths);
            }
            global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<global::System.Guid>> __value_ComponentTypeToGuidList = ((global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore)value).ComponentTypeToGuidList;
            if (__value_ComponentTypeToGuidList is not null)
            {
                writer.WritePropertyName(PropName_ComponentTypeToGuidList);
                DictionaryStringHashSetGuidSerializeHandler(writer, __value_ComponentTypeToGuidList);
            }

            writer.WriteEndObject();
        }

        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ComponentGuidToAssemblyQualifiedName")]
        private static extern void __set_SettingsStore_ComponentGuidToAssemblyQualifiedName(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore obj, global::System.Collections.Generic.Dictionary<string, string> value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ProbingPaths")]
        private static extern void __set_SettingsStore_ProbingPaths(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore obj, global::System.Collections.Generic.HashSet<string> value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ComponentTypeToGuidList")]
        private static extern void __set_SettingsStore_ComponentTypeToGuidList(global::Microsoft.TemplateEngine.Edge.Settings.SettingsStore obj, global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<global::System.Guid>> value);
    }
}