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