2 instantiations of ComponentMarker
Microsoft.AspNetCore.Components.Server (2)
CircuitPersistenceManagerSerializerContext.ComponentMarker.g.cs (1)
33ObjectCreator = () => new global::Microsoft.AspNetCore.Components.ComponentMarker(),
src\Shared\Components\ComponentMarker.cs (1)
67return new()
120 references to ComponentMarker
Microsoft.AspNetCore.Components.Server (88)
CircuitPersistenceManagerSerializerContext.ComponentMarker.g.cs (56)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ComponentMarker>? _ComponentMarker; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ComponentMarker> ComponentMarker 24get => _ComponentMarker ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ComponentMarker>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.ComponentMarker)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ComponentMarker> Create_ComponentMarker(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.ComponentMarker>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ComponentMarker> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.ComponentMarker> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.ComponentMarker>(options, objectInfo); 58DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 60Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).Type, 61Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).Type = value!, 68AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("Type", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 78DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 80Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).PrerenderId, 81Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).PrerenderId = value!, 88AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("PrerenderId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 98DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 100Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).Key, 101Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).Key = value!, 108AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("Key", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Components.ComponentMarkerKey?), global::System.Array.Empty<global::System.Type>(), null), 118DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 120Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).Sequence, 121Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).Sequence = value!, 128AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("Sequence", InstanceMemberBindingFlags, null, typeof(int?), global::System.Array.Empty<global::System.Type>(), null), 138DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 140Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).Descriptor, 141Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).Descriptor = value!, 148AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("Descriptor", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 158DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 160Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).Assembly, 161Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).Assembly = value!, 168AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("Assembly", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 178DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 180Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).TypeName, 181Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).TypeName = value!, 188AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("TypeName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 198DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 200Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).ParameterDefinitions, 201Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).ParameterDefinitions = value!, 208AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("ParameterDefinitions", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 218DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ComponentMarker), 220Getter = static obj => ((global::Microsoft.AspNetCore.Components.ComponentMarker)obj).ParameterValues, 221Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ComponentMarker>(obj).ParameterValues = value!, 228AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ComponentMarker).GetProperty("ParameterValues", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 238private void ComponentMarkerSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.ComponentMarker value) 242writer.WriteString(PropName_Type, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).Type); 243writer.WriteString(PropName_PrerenderId, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).PrerenderId); 245global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).Key, NullableComponentMarkerKey); 247global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).Sequence, NullableInt32); 248writer.WriteString(PropName_Descriptor, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).Descriptor); 249writer.WriteString(PropName_Assembly, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).Assembly); 250writer.WriteString(PropName_TypeName, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).TypeName); 251writer.WriteString(PropName_ParameterDefinitions, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).ParameterDefinitions); 252writer.WriteString(PropName_ParameterValues, ((global::Microsoft.AspNetCore.Components.ComponentMarker)value).ParameterValues);
CircuitPersistenceManagerSerializerContext.DictionaryInt32ComponentMarker.g.cs (11)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>>? _DictionaryInt32ComponentMarker; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> DictionaryInt32ComponentMarker 24get => _DictionaryInt32ComponentMarker ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> Create_DictionaryInt32ComponentMarker(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> jsonTypeInfo)) 31var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> 33ObjectCreator = () => new global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>(), 37jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>, int, global::Microsoft.AspNetCore.Components.ComponentMarker>(options, info);
CircuitPersistenceManagerSerializerContext.GetJsonTypeInfo.g.cs (2)
24if (type == typeof(global::Microsoft.AspNetCore.Components.ComponentMarker)) 36if (type == typeof(global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>))
Circuits\CircuitPersistenceManager.cs (8)
147if (!persistedMarkers.TryGetValue(operation.SsrComponentId, out var marker)) 163static Dictionary<int, ComponentMarker> TryDeserializeMarkers(byte[] rootComponents) 172return JsonSerializer.Deserialize<Dictionary<int, ComponentMarker>>( 193var persistedComponents = new Dictionary<int, ComponentMarker>(); 202var marker = ComponentMarker.Create(ComponentMarker.ServerMarkerType, prerendered: false, componentKey); 231[JsonSerializable(typeof(Dictionary<int, ComponentMarker>))]
Circuits\IServerComponentDeserializer.cs (1)
15bool TryDeserializeWebRootComponentDescriptor(ComponentMarker record, [NotNullWhen(true)] out WebRootComponentDescriptor? result);
Circuits\ServerComponentDeserializer.cs (7)
96var markers = JsonSerializer.Deserialize<IEnumerable<ComponentMarker>>(serializedComponentRecords, ServerComponentSerializationSettings.JsonSerializationOptions); 101foreach (var marker in markers) 145public bool TryDeserializeWebRootComponentDescriptor(ComponentMarker record, [NotNullWhen(true)] out WebRootComponentDescriptor? result) 227private bool TryDeserializeServerComponent(ComponentMarker record, out ServerComponent result) 231if (record.Type is not (ComponentMarker.ServerMarkerType or ComponentMarker.AutoMarkerType)) 272private (ComponentDescriptor, ServerComponent) DeserializeComponentDescriptor(ComponentMarker record)
src\Components\Shared\src\RootComponentOperation.cs (1)
19public ComponentMarker? Marker { get; set; }
src\Shared\Components\ComponentMarker.cs (1)
65public static ComponentMarker Create(string type, bool prerendered, ComponentMarkerKey? key)
src\Shared\Components\ServerComponentSerializer.cs (1)
20ref ComponentMarker marker,
Microsoft.AspNetCore.Components.Server.Tests (32)
Circuits\CircuitHostTest.cs (5)
869private ComponentMarker CreateMarker(Type type, string locationHash, Dictionary<string, object> parameters = null, string componentKey = "") 873var marker = ComponentMarker.Create(ComponentMarker.ServerMarkerType, false, key); 1058public bool TryDeserializeWebRootComponentDescriptor(ComponentMarker record, [NotNullWhen(true)] out WebRootComponentDescriptor result)
Circuits\CircuitPersistenceManagerTest.cs (8)
374var actual = JsonSerializer.Deserialize<Dictionary<int, ComponentMarker>>(rootComponents, SerializerOptions); 379Assert.True(actual.TryGetValue(id, out var marker), $"Expected marker with ID {id} not found."); 514It.IsAny<ComponentMarker>(), 516.Callback((ComponentMarker marker, out WebRootComponentDescriptor descriptor) => 532var markers = new List<ComponentMarker>(); 537var marker = ComponentMarker.Create(ComponentMarker.ServerMarkerType, false, key);
Circuits\ComponentHubTest.cs (2)
366public delegate bool TestTryDeserializeWebRootComponentDescriptor(ComponentMarker record, [NotNullWhen(true)] out WebRootComponentDescriptor result); 389public bool TryDeserializeWebRootComponentDescriptor(ComponentMarker record, [NotNullWhen(true)] out WebRootComponentDescriptor result)
Circuits\ServerComponentDeserializerTest.cs (17)
443private string SerializeMarkers(ComponentMarker[] markers) => 446private ComponentMarker CreateMarker(Type type, Dictionary<string, object> parameters = null) 450var marker = ComponentMarker.Create(ComponentMarker.ServerMarkerType, false, key); 459private ComponentMarker[] CreateMarkers(params Type[] types) 462var markers = new ComponentMarker[types.Length]; 465markers[i] = ComponentMarker.Create(ComponentMarker.ServerMarkerType, false, null); 472private ComponentMarker[] CreateMarkers(params (Type, Dictionary<string, object>)[] types) 475var markers = new ComponentMarker[types.Length]; 479markers[i] = ComponentMarker.Create(ComponentMarker.ServerMarkerType, false, null); 490private ComponentMarker[] CreateMarkers(ServerComponentInvocationSequence sequence, params Type[] types) 493var markers = new ComponentMarker[types.Length]; 496markers[i] = ComponentMarker.Create(ComponentMarker.ServerMarkerType, false, null);