2 types derived from ComponentState
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointComponentState.cs (1)
16
internal sealed class EndpointComponentState :
ComponentState
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteComponentState.cs (1)
11
internal sealed class RemoteComponentState :
ComponentState
1 instantiation of ComponentState
Microsoft.AspNetCore.Components (1)
RenderTree\Renderer.cs (1)
429
=> new
ComponentState
(this, componentId, component, parentComponentState);
130 references to ComponentState
Microsoft.AspNetCore.Components (105)
CascadingParameterState.cs (3)
27
public static IReadOnlyList<CascadingParameterState> FindCascadingParameters(
ComponentState
componentState, out bool hasSingleDeliveryParameters)
76
internal static ICascadingValueSupplier? GetMatchingCascadingValueSupplier(in CascadingParameterInfo info, Renderer renderer,
ComponentState
? componentState)
79
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 (2)
16
void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo);
18
void Unsubscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo);
PersistentState\PersistentStateValueProvider.cs (4)
31
var
componentState = (
ComponentState
)key!;
41
public void Subscribe(
ComponentState
subscriber, in CascadingParameterInfo parameterInfo)
55
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)
154
private static object? GetSerializableKey(
ComponentState
componentState)
165
private static string GetComponentType(
ComponentState
componentState) => componentState.Component.GetType().FullName!;
167
private static string GetParentComponentType(
ComponentState
componentState)
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
37
private readonly
ComponentState
_subscriber;
53
ComponentState
subscriber,
Rendering\ComponentState.cs (8)
29
/// Constructs an instance of <see cref="
ComponentState
"/>.
34
/// <param name="parentComponentState">The <see cref="
ComponentState
"/> for the parent component, or null if this is a root component.</param>
35
public ComponentState(Renderer renderer, int componentId, IComponent component,
ComponentState
? parentComponentState)
62
private static
ComponentState
? GetSectionOutletLogicalParent(Renderer renderer, SectionOutlet sectionOutlet)
85
/// Gets the <see cref="
ComponentState
"/> of the parent component, or null if this is a root component.
87
public
ComponentState
? ParentComponentState { get; }
90
/// Gets the <see cref="
ComponentState
"/> of the logical parent component, or null if this is a root component.
92
public
ComponentState
? LogicalParentComponentState { get; }
Rendering\RenderQueueEntry.cs (2)
11
public readonly
ComponentState
ComponentState;
14
public RenderQueueEntry(
ComponentState
componentState, RenderFragment renderFragment)
RenderTree\Renderer.cs (43)
34
private readonly Dictionary<int,
ComponentState
> _componentStateById = new Dictionary<int,
ComponentState
>();
35
private readonly Dictionary<IComponent,
ComponentState
> _componentStateByComponent = new Dictionary<IComponent,
ComponentState
>();
159
/// Gets the <see cref="
ComponentState
"/> associated with the specified component.
162
/// <returns>The corresponding <see cref="
ComponentState
"/>.</returns>
163
protected
ComponentState
GetComponentState(int componentId)
182
protected internal
ComponentState
GetComponentState(IComponent component)
215
var
componentState = GetRequiredComponentState(componentId);
310
var
componentState = GetRequiredRootComponentState(componentId);
403
private
ComponentState
AttachAndInitComponent(IComponent component, int parentComponentId)
406
var
parentComponentState = GetOptionalComponentState(parentComponentId);
407
var
componentState = CreateComponentState(componentId, component, parentComponentState);
413
internal void RegisterComponentState(IComponent component, int componentId,
ComponentState
componentState)
420
/// Creates a <see cref="
ComponentState
"/> instance to track state associated with a newly-instantiated component.
422
/// may override this method to use their own subclasses of <see cref="
ComponentState
"/>.
426
/// <param name="parentComponentState">The <see cref="
ComponentState
"/> associated with the parent component, or null if this is a root component.</param>
427
/// <returns>A <see cref="
ComponentState
"/> for the new component.</returns>
428
protected virtual
ComponentState
CreateComponentState(int componentId, IComponent component,
ComponentState
? parentComponentState)
506
ComponentState
? receiverComponentState = null;
602
internal
ComponentState
InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
620
var
newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
651
internal void AddToPendingTasksWithErrorHandling(Task task,
ComponentState
? owningComponentState)
683
/// <param name="componentState">The <see cref="
ComponentState
"/> for the component associated with this pending task, if any.</param>
685
protected virtual void AddPendingTask(
ComponentState
? componentState, Task task)
735
var
componentState = GetOptionalComponentState(componentId);
780
internal
ComponentState
GetRequiredComponentState(int componentId)
781
=> _componentStateById.TryGetValue(componentId, out
var
componentState)
785
private
ComponentState
? GetOptionalComponentState(int componentId)
786
=> _componentStateById.TryGetValue(componentId, out
var
componentState)
790
private
ComponentState
GetRequiredRootComponentState(int componentId)
792
var
componentState = GetRequiredComponentState(componentId);
928
var
componentState = GetOptionalComponentState(array[i].ComponentId);
963
var
componentState = GetOptionalComponentState(array[i]);
977
private void NotifyRenderCompleted(
ComponentState
state, ref List<Task> batch)
1012
var
componentState = renderQueueEntry.ComponentState;
1032
var
disposeComponentState = GetRequiredComponentState(disposeComponentId);
1132
private async Task GetErrorHandledTask(Task taskToHandle,
ComponentState
? owningComponentState)
1150
var
componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1167
private void HandleExceptionViaErrorBoundary(Exception error,
ComponentState
? errorSourceOrNull)
1183
var
candidate = errorSourceOrNull;
1265
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 (15)
Rendering\EndpointComponentState.cs (1)
29
public EndpointComponentState(Renderer renderer, int componentId, IComponent component,
ComponentState
? parentComponentState)
Rendering\EndpointHtmlRenderer.cs (3)
170
protected override
ComponentState
CreateComponentState(int componentId, IComponent component,
ComponentState
? parentComponentState)
179
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)
196
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);