10 types derived from ComponentState
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.QuickGrid.Tests (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.Components.Web.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly (1)
9 instantiations of ComponentState
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (7)
215 references to ComponentState
Microsoft.AspNetCore.Components (99)
RenderTree\Renderer.cs (43)
34private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>();
35private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>();
153/// Gets the <see cref="ComponentState"/> associated with the specified component.
156/// <returns>The corresponding <see cref="ComponentState"/>.</returns>
157protected ComponentState GetComponentState(int componentId)
176protected internal ComponentState GetComponentState(IComponent component)
209var componentState = GetRequiredComponentState(componentId);
304var componentState = GetRequiredRootComponentState(componentId);
397private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
400var parentComponentState = GetOptionalComponentState(parentComponentId);
401var componentState = CreateComponentState(componentId, component, parentComponentState);
407internal void RegisterComponentState(IComponent component, int componentId, ComponentState componentState)
414/// Creates a <see cref="ComponentState"/> instance to track state associated with a newly-instantiated component.
416/// may override this method to use their own subclasses of <see cref="ComponentState"/>.
420/// <param name="parentComponentState">The <see cref="ComponentState"/> associated with the parent component, or null if this is a root component.</param>
421/// <returns>A <see cref="ComponentState"/> for the new component.</returns>
422protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
500ComponentState? receiverComponentState = null;
596internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
614var newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
645internal void AddToPendingTasksWithErrorHandling(Task task, ComponentState? owningComponentState)
677/// <param name="componentState">The <see cref="ComponentState"/> for the component associated with this pending task, if any.</param>
679protected virtual void AddPendingTask(ComponentState? componentState, Task task)
729var componentState = GetOptionalComponentState(componentId);
774internal ComponentState GetRequiredComponentState(int componentId)
775=> _componentStateById.TryGetValue(componentId, out var componentState)
779private ComponentState? GetOptionalComponentState(int componentId)
780=> _componentStateById.TryGetValue(componentId, out var componentState)
784private ComponentState GetRequiredRootComponentState(int componentId)
786var componentState = GetRequiredComponentState(componentId);
922var componentState = GetOptionalComponentState(array[i].ComponentId);
957var componentState = GetOptionalComponentState(array[i]);
971private void NotifyRenderCompleted(ComponentState state, ref List<Task> batch)
1006var componentState = renderQueueEntry.ComponentState;
1026var disposeComponentState = GetRequiredComponentState(disposeComponentId);
1126private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState)
1144var componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1161private void HandleExceptionViaErrorBoundary(Exception error, ComponentState? errorSourceOrNull)
1177var candidate = errorSourceOrNull;
1259foreach (var componentState in _componentStateById.Values)
Microsoft.AspNetCore.Components.Authorization.Tests (3)
Microsoft.AspNetCore.Components.Endpoints (13)
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Microsoft.AspNetCore.Components.Forms.Tests (3)
Microsoft.AspNetCore.Components.QuickGrid.Tests (3)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.Server.Tests (7)
Microsoft.AspNetCore.Components.Tests (63)
PersistentStateValueProviderTests.cs (9)
29var componentState = componentStates.First();
33new List<(ComponentState, string, string)>
62var componentState = componentStates.First();
89var componentState = componentStates.First();
102private static void InitializeState(PersistentComponentState state, List<(ComponentState componentState, string propertyName, string value)> items)
121private static List<ComponentState> CreateComponentState(
127var parentComponentState = parentComponent != null ? new ComponentState(renderer, i++, parentComponent, null) : null;
129var result = new List<ComponentState>();
132var componentState = new ComponentState(renderer, i++, component, parentComponentState);
PersistentValueProviderComponentSubscriptionTests.cs (18)
27var componentState = CreateComponentState(renderer, component, null, null);
49var componentState = CreateComponentState(renderer, component, null, null);
73var componentState = CreateComponentState(renderer, component, null, null);
103var componentState = CreateComponentState(renderer, component, null, null);
133var componentState = CreateComponentState(renderer, component, null, null);
163var componentState = CreateComponentState(renderer, component, null, null);
193var componentState = CreateComponentState(renderer, component, null, null);
213var componentState = CreateComponentState(renderer, component, null, null);
255var componentState = renderer.GetComponentState(component);
300var componentState = CreateComponentState(renderer, component, null, null);
345var componentState = CreateComponentState(renderer, component, null, null);
404var componentState = CreateComponentState(renderer, component, null, null);
465private static ComponentState CreateComponentState(
471var parentComponentState = parentComponent != null
474var componentState = new ComponentState(renderer, 2, component, parentComponentState);
653var componentState = CreateComponentState(renderer, component, null, null);
676var componentState = CreateComponentState(renderer, component, null, null);
699var componentState = CreateComponentState(renderer, component, null, null);
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.Web.Tests (5)
Microsoft.AspNetCore.Components.WebAssembly (3)