File: _generated\3\WebRendererSerializerContext.NavigationOptions.g.cs
Web Access
Project: src\aspnetcore\src\Components\Web\src\Microsoft.AspNetCore.Components.Web.csproj (Microsoft.AspNetCore.Components.Web)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Microsoft.AspNetCore.Components.RenderTree
{
    internal sealed partial class WebRendererSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.NavigationOptions>? _NavigationOptions;
        
        /// <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.AspNetCore.Components.NavigationOptions> NavigationOptions
        #nullable enable annotations
        {
            get => _NavigationOptions ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.NavigationOptions>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.NavigationOptions));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.NavigationOptions> Create_NavigationOptions(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.NavigationOptions>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.NavigationOptions> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.NavigationOptions>
                {
                    ObjectCreator = () => new global::Microsoft.AspNetCore.Components.NavigationOptions(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => NavigationOptionsPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.NavigationOptions).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = NavigationOptionsSerializeHandler,
                    PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
                    TypeClassifierFactory = null,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.NavigationOptions>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] NavigationOptionsPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[4];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Components.NavigationOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.NavigationOptions)obj).ForceLoad,
                Setter = static (obj, value) => __set_NavigationOptions_ForceLoad(ref global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.NavigationOptions>(obj), value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ForceLoad",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.NavigationOptions).GetProperty("ForceLoad", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info0);
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Components.NavigationOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.NavigationOptions)obj).ReplaceHistoryEntry,
                Setter = static (obj, value) => __set_NavigationOptions_ReplaceHistoryEntry(ref global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.NavigationOptions>(obj), value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ReplaceHistoryEntry",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.NavigationOptions).GetProperty("ReplaceHistoryEntry", 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.AspNetCore.Components.NavigationOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.NavigationOptions)obj).HistoryEntryState,
                Setter = static (obj, value) => __set_NavigationOptions_HistoryEntryState(ref global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.NavigationOptions>(obj), value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "HistoryEntryState",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.NavigationOptions).GetProperty("HistoryEntryState", 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<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Components.NavigationOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.NavigationOptions)obj).RelativeToCurrentUri,
                Setter = static (obj, value) => __set_NavigationOptions_RelativeToCurrentUri(ref global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.NavigationOptions>(obj), value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RelativeToCurrentUri",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.NavigationOptions).GetProperty("RelativeToCurrentUri", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info3);
 
            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 NavigationOptionsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.NavigationOptions value)
        {
            writer.WriteStartObject();
 
            writer.WriteBoolean(PropName_ForceLoad, ((global::Microsoft.AspNetCore.Components.NavigationOptions)value).ForceLoad);
            writer.WriteBoolean(PropName_ReplaceHistoryEntry, ((global::Microsoft.AspNetCore.Components.NavigationOptions)value).ReplaceHistoryEntry);
            writer.WriteString(PropName_HistoryEntryState, ((global::Microsoft.AspNetCore.Components.NavigationOptions)value).HistoryEntryState);
            writer.WriteBoolean(PropName_RelativeToCurrentUri, ((global::Microsoft.AspNetCore.Components.NavigationOptions)value).RelativeToCurrentUri);
 
            writer.WriteEndObject();
        }
 
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ForceLoad")]
        private static extern void __set_NavigationOptions_ForceLoad(ref global::Microsoft.AspNetCore.Components.NavigationOptions obj, bool value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ReplaceHistoryEntry")]
        private static extern void __set_NavigationOptions_ReplaceHistoryEntry(ref global::Microsoft.AspNetCore.Components.NavigationOptions obj, bool value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_HistoryEntryState")]
        private static extern void __set_NavigationOptions_HistoryEntryState(ref global::Microsoft.AspNetCore.Components.NavigationOptions obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_RelativeToCurrentUri")]
        private static extern void __set_NavigationOptions_RelativeToCurrentUri(ref global::Microsoft.AspNetCore.Components.NavigationOptions obj, bool value);
    }
}