6 types derived from ComponentState
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.Components.Web.Tests (1)
3 instantiations of ComponentState
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (1)
140 references to ComponentState
Microsoft.AspNetCore.Components (81)
RenderTree\Renderer.cs (42)
29private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>();
30private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>();
130/// Gets the <see cref="ComponentState"/> associated with the specified component.
133/// <returns>The corresponding <see cref="ComponentState"/>.</returns>
134protected ComponentState GetComponentState(int componentId)
153protected internal ComponentState GetComponentState(IComponent component)
185var componentState = GetRequiredComponentState(componentId);
275var componentState = GetRequiredRootComponentState(componentId);
368private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
371var parentComponentState = GetOptionalComponentState(parentComponentId);
372var componentState = CreateComponentState(componentId, component, parentComponentState);
381/// Creates a <see cref="ComponentState"/> instance to track state associated with a newly-instantiated component.
383/// may override this method to use their own subclasses of <see cref="ComponentState"/>.
387/// <param name="parentComponentState">The <see cref="ComponentState"/> associated with the parent component, or null if this is a root component.</param>
388/// <returns>A <see cref="ComponentState"/> for the new component.</returns>
389protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
454ComponentState? receiverComponentState = null;
524internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
542var newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
573internal void AddToPendingTasksWithErrorHandling(Task task, ComponentState? owningComponentState)
605/// <param name="componentState">The <see cref="ComponentState"/> for the component associated with this pending task, if any.</param>
607protected virtual void AddPendingTask(ComponentState? componentState, Task task)
657var componentState = GetOptionalComponentState(componentId);
702private ComponentState GetRequiredComponentState(int componentId)
703=> _componentStateById.TryGetValue(componentId, out var componentState)
707private ComponentState? GetOptionalComponentState(int componentId)
708=> _componentStateById.TryGetValue(componentId, out var componentState)
712private ComponentState GetRequiredRootComponentState(int componentId)
714var componentState = GetRequiredComponentState(componentId);
839var componentState = GetOptionalComponentState(array[i].ComponentId);
874var componentState = GetOptionalComponentState(array[i]);
888private void NotifyRenderCompleted(ComponentState state, ref List<Task> batch)
923var componentState = renderQueueEntry.ComponentState;
942var disposeComponentState = GetRequiredComponentState(disposeComponentId);
1042private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState)
1060var componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1077private void HandleExceptionViaErrorBoundary(Exception error, ComponentState? errorSourceOrNull)
1093var candidate = errorSourceOrNull;
1175foreach (var componentState in _componentStateById.Values)
Microsoft.AspNetCore.Components.Authorization.Tests (3)
Microsoft.AspNetCore.Components.Endpoints (11)
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Microsoft.AspNetCore.Components.Forms.Tests (3)
Microsoft.AspNetCore.Components.Server.Tests (7)
Microsoft.AspNetCore.Components.Tests (20)
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.Web.Tests (5)