3 types derived from ComponentState
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointComponentState.cs (1)
17
internal sealed class EndpointComponentState :
ComponentState
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteComponentState.cs (1)
11
internal sealed class RemoteComponentState :
ComponentState
Microsoft.AspNetCore.Components.WebAssembly (1)
Rendering\WebAssemblyComponentState.cs (1)
11
internal sealed class WebAssemblyComponentState :
ComponentState
1 instantiation of ComponentState
Microsoft.AspNetCore.Components (1)
RenderTree\Renderer.cs (1)
451
=> new
ComponentState
(this, componentId, component, parentComponentState);
137 references to ComponentState
Microsoft.AspNetCore.Components (108)
CascadingParameterState.cs (3)
38
public static IReadOnlyList<CascadingParameterState> FindCascadingParameters(
ComponentState
componentState, out bool hasSingleDeliveryParameters)
87
internal static ICascadingValueSupplier? GetMatchingCascadingValueSupplier(in CascadingParameterInfo info, Renderer renderer,
ComponentState
? componentState)
90
var
candidate = componentState;
CascadingParameterValueProvider.cs (5)
13
private readonly Func<
ComponentState
, TAttribute, CascadingParameterInfo, CascadingParameterSubscription> _subscribeFactory;
15
public CascadingParameterValueProvider(Func<
ComponentState
, TAttribute, CascadingParameterInfo, CascadingParameterSubscription> subscribeFactory)
27
var subscriptionKey = new ComponentSubscriptionKey((
ComponentState
)key!, parameterInfo.PropertyName);
35
public void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
41
public void Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
CascadingValue.cs (5)
14
private HashSet<
ComponentState
>? _subscribers; // Lazily instantiated
148
void ICascadingValueSupplier.Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
157
_subscribers ??= new HashSet<
ComponentState
>();
161
void ICascadingValueSupplier.Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
168
foreach (
var
subscriber in _subscribers!)
CascadingValueServiceCollectionExtensions.cs (1)
65
Func<IServiceProvider, Func<
ComponentState
, TAttribute, CascadingParameterInfo, CascadingParameterSubscription>> subscribeFactory)
CascadingValueSource.cs (6)
19
private readonly ConcurrentDictionary<Dispatcher, List<
ComponentState
>>? _subscribers;
104
: new
ComponentState
[subscribersCount];
109
foreach (
var
subscriber in subscribersCopy)
163
void ICascadingValueSupplier.Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
172
void ICascadingValueSupplier.Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
194
private
ComponentState
_values;
ComponentSubscriptionKey.cs (2)
10
internal readonly struct ComponentSubscriptionKey(
ComponentState
subscriber, string propertyName) : IEquatable<ComponentSubscriptionKey>
12
public
ComponentState
Subscriber { get; } = subscriber;
ICascadingValueSupplier.cs (3)
27
void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo);
29
void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo, CascadingParameterSubscriptionMode mode)
32
void Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo);
PersistentState\PersistentStateValueProvider.cs (6)
31
var
componentState = (
ComponentState
)key!;
41
public void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
45
ComponentState
subscriber,
50
private void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo, bool preserveCurrentValue)
71
public void Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
PersistentState\PersistentStateValueProviderKeyResolver.cs (5)
33
internal static string ComputeKey(
ComponentState
componentState, string propertyName)
59
private static string ComputeFinalKey(byte[] preKey,
ComponentState
componentState)
145
private static object? GetSerializableKey(
ComponentState
componentState)
156
private static string GetComponentType(
ComponentState
componentState) => componentState.Component.GetType().FullName!;
158
private static string GetParentComponentType(
ComponentState
componentState)
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
37
private readonly
ComponentState
_subscriber;
53
ComponentState
subscriber,
Rendering\ComponentState.cs (8)
30
/// Constructs an instance of <see cref="
ComponentState
"/>.
35
/// <param name="parentComponentState">The <see cref="
ComponentState
"/> for the parent component, or null if this is a root component.</param>
36
public ComponentState(Renderer renderer, int componentId, IComponent component,
ComponentState
? parentComponentState)
63
private static
ComponentState
? GetSectionOutletLogicalParent(Renderer renderer, SectionOutlet sectionOutlet)
86
/// Gets the <see cref="
ComponentState
"/> of the parent component, or null if this is a root component.
88
public
ComponentState
? ParentComponentState { get; }
91
/// Gets the <see cref="
ComponentState
"/> of the logical parent component, or null if this is a root component.
93
public
ComponentState
? LogicalParentComponentState { get; }
Rendering\RenderQueueEntry.cs (2)
11
public readonly
ComponentState
ComponentState;
14
public RenderQueueEntry(
ComponentState
componentState, RenderFragment renderFragment)
RenderTree\Renderer.cs (43)
35
private readonly Dictionary<int,
ComponentState
> _componentStateById = new Dictionary<int,
ComponentState
>();
36
private readonly Dictionary<IComponent,
ComponentState
> _componentStateByComponent = new Dictionary<IComponent,
ComponentState
>();
179
/// Gets the <see cref="
ComponentState
"/> associated with the specified component.
182
/// <returns>The corresponding <see cref="
ComponentState
"/>.</returns>
183
protected
ComponentState
GetComponentState(int componentId)
202
protected internal
ComponentState
GetComponentState(IComponent component)
236
var
componentState = GetRequiredComponentState(componentId);
332
var
componentState = GetRequiredRootComponentState(componentId);
425
private
ComponentState
AttachAndInitComponent(IComponent component, int parentComponentId)
428
var
parentComponentState = GetOptionalComponentState(parentComponentId);
429
var
componentState = CreateComponentState(componentId, component, parentComponentState);
435
internal void RegisterComponentState(IComponent component, int componentId,
ComponentState
componentState)
442
/// Creates a <see cref="
ComponentState
"/> instance to track state associated with a newly-instantiated component.
444
/// may override this method to use their own subclasses of <see cref="
ComponentState
"/>.
448
/// <param name="parentComponentState">The <see cref="
ComponentState
"/> associated with the parent component, or null if this is a root component.</param>
449
/// <returns>A <see cref="
ComponentState
"/> for the new component.</returns>
450
protected virtual
ComponentState
CreateComponentState(int componentId, IComponent component,
ComponentState
? parentComponentState)
528
ComponentState
? receiverComponentState = null;
624
internal
ComponentState
InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
642
var
newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
673
internal void AddToPendingTasksWithErrorHandling(Task task,
ComponentState
? owningComponentState)
705
/// <param name="componentState">The <see cref="
ComponentState
"/> for the component associated with this pending task, if any.</param>
707
protected virtual void AddPendingTask(
ComponentState
? componentState, Task task)
757
var
componentState = GetOptionalComponentState(componentId);
802
internal
ComponentState
GetRequiredComponentState(int componentId)
803
=> _componentStateById.TryGetValue(componentId, out
var
componentState)
807
private
ComponentState
? GetOptionalComponentState(int componentId)
808
=> _componentStateById.TryGetValue(componentId, out
var
componentState)
812
private
ComponentState
GetRequiredRootComponentState(int componentId)
814
var
componentState = GetRequiredComponentState(componentId);
950
var
componentState = GetOptionalComponentState(array[i].ComponentId);
985
var
componentState = GetOptionalComponentState(array[i]);
999
private void NotifyRenderCompleted(
ComponentState
state, ref List<Task> batch)
1034
var
componentState = renderQueueEntry.ComponentState;
1054
var
disposeComponentState = GetRequiredComponentState(disposeComponentId);
1154
private async Task GetErrorHandledTask(Task taskToHandle,
ComponentState
? owningComponentState)
1172
var
componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1189
private void HandleExceptionViaErrorBoundary(Exception error,
ComponentState
? errorSourceOrNull)
1205
var
candidate = errorSourceOrNull;
1287
foreach (
var
componentState in _componentStateById.Values)
RenderTree\Renderer.Log.cs (4)
19
public static void InitializingComponent(ILogger logger,
ComponentState
componentState,
ComponentState
parentComponentState)
37
public static void RenderingComponent(ILogger logger,
ComponentState
componentState)
48
public static void DisposingComponent(ILogger logger,
ComponentState
componentState)
RenderTree\RenderTreeDiffBuilder.cs (3)
697
var
componentState = oldFrame.ComponentStateField;
781
var
currentComponentState = renderer.GetRequiredComponentState(componentId);
1003
var
childComponentState = diffContext.Renderer.InstantiateChildComponentOnFrame(frames, frameIndex, parentComponentId);
RenderTree\RenderTreeFrame.cs (4)
145
[FieldOffset(24)] internal
ComponentState
ComponentStateField;
177
internal
ComponentState
ComponentState => ComponentStateField;
316
private RenderTreeFrame(int sequence, int componentSubtreeLength, [DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType,
ComponentState
componentState, object componentKey)
432
internal RenderTreeFrame WithComponent(
ComponentState
componentState)
Routing\SupplyParameterFromQueryValueProvider.cs (6)
14
private HashSet<
ComponentState
>? _subscribers;
15
private HashSet<
ComponentState
>? _pendingSubscribers;
36
public void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
52
public void Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
122
foreach (
var
subscriber in _subscribers)
132
foreach (
var
subscriber in _pendingSubscribers)
Microsoft.AspNetCore.Components.Endpoints (16)
Rendering\EndpointComponentState.cs (2)
33
public EndpointComponentState(Renderer renderer, int componentId, IComponent component,
ComponentState
? parentComponentState)
102
private int FindSequenceInParent(
ComponentState
parentState, CacheView target)
Rendering\EndpointHtmlRenderer.cs (3)
173
protected override
ComponentState
CreateComponentState(int componentId, IComponent component,
ComponentState
? parentComponentState)
182
protected override void AddPendingTask(
ComponentState
? componentState, Task task)
Rendering\EndpointHtmlRenderer.EventDispatch.cs (2)
259
for (
var
current = GetComponentState(componentId); current != null; current = current.ParentComponentState)
268
static string GetName(
ComponentState
current) => current.Component.GetType().Name;
Rendering\EndpointHtmlRenderer.Prerendering.cs (6)
47
var
componentState = GetComponentState(component);
60
var
componentState = GetComponentState(componentId);
64
private static SSRRenderModeBoundary? GetClosestRenderModeBoundary(
ComponentState
componentState)
66
var
currentComponentState = componentState;
286
internal (int sequence, object? key) GetSequenceAndKey(
ComponentState
boundaryComponentState)
304
var
targetState = boundaryComponentState.ParentComponentState;
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
197
var
componentState = GetComponentState(componentId);
SessionCascadingValueSupplier.cs (1)
36
ComponentState
componentState,
TempData\TempDataCascadingValueSupplier.cs (1)
32
ComponentState
componentState,
Microsoft.AspNetCore.Components.Server (3)
Circuits\RemoteComponentState.cs (1)
17
ComponentState
? parentComponentState)
Circuits\RemoteRenderer.cs (2)
317
protected override
ComponentState
CreateComponentState(int componentId, IComponent component,
ComponentState
? parentComponentState)
Microsoft.AspNetCore.Components.Web (7)
Forms\Editor.cs (2)
64
void ICascadingValueSupplier.Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
69
void ICascadingValueSupplier.Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
Forms\Mapping\FormMappingScope.cs (2)
89
void ICascadingValueSupplier.Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
92
void ICascadingValueSupplier.Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
Forms\Mapping\SupplyParameterFromFormValueProvider.cs (2)
66
void ICascadingValueSupplier.Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
69
void ICascadingValueSupplier.Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (1)
249
var
componentState = GetComponentState(forComponentId);
Microsoft.AspNetCore.Components.WebAssembly (3)
Rendering\WebAssemblyComponentState.cs (1)
19
ComponentState
? parentComponentState)
Rendering\WebAssemblyRenderer.cs (2)
262
protected override
ComponentState
CreateComponentState(int componentId, IComponent component,
ComponentState
? parentComponentState)