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)
174 references to ComponentState
Microsoft.AspNetCore.Components (93)
RenderTree\Renderer.cs (43)
30private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>();
31private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>();
136/// Gets the <see cref="ComponentState"/> associated with the specified component.
139/// <returns>The corresponding <see cref="ComponentState"/>.</returns>
140protected ComponentState GetComponentState(int componentId)
159protected internal ComponentState GetComponentState(IComponent component)
191var componentState = GetRequiredComponentState(componentId);
281var componentState = GetRequiredRootComponentState(componentId);
374private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
377var parentComponentState = GetOptionalComponentState(parentComponentId);
378var componentState = CreateComponentState(componentId, component, parentComponentState);
384internal void RegisterComponentState(IComponent component, int componentId, ComponentState componentState)
391/// Creates a <see cref="ComponentState"/> instance to track state associated with a newly-instantiated component.
393/// may override this method to use their own subclasses of <see cref="ComponentState"/>.
397/// <param name="parentComponentState">The <see cref="ComponentState"/> associated with the parent component, or null if this is a root component.</param>
398/// <returns>A <see cref="ComponentState"/> for the new component.</returns>
399protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
464ComponentState? receiverComponentState = null;
534internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
552var newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
583internal void AddToPendingTasksWithErrorHandling(Task task, ComponentState? owningComponentState)
615/// <param name="componentState">The <see cref="ComponentState"/> for the component associated with this pending task, if any.</param>
617protected virtual void AddPendingTask(ComponentState? componentState, Task task)
667var componentState = GetOptionalComponentState(componentId);
712private ComponentState GetRequiredComponentState(int componentId)
713=> _componentStateById.TryGetValue(componentId, out var componentState)
717private ComponentState? GetOptionalComponentState(int componentId)
718=> _componentStateById.TryGetValue(componentId, out var componentState)
722private ComponentState GetRequiredRootComponentState(int componentId)
724var componentState = GetRequiredComponentState(componentId);
849var componentState = GetOptionalComponentState(array[i].ComponentId);
884var componentState = GetOptionalComponentState(array[i]);
898private void NotifyRenderCompleted(ComponentState state, ref List<Task> batch)
933var componentState = renderQueueEntry.ComponentState;
955var disposeComponentState = GetRequiredComponentState(disposeComponentId);
1055private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState)
1073var componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1090private void HandleExceptionViaErrorBoundary(Exception error, ComponentState? errorSourceOrNull)
1106var candidate = errorSourceOrNull;
1188foreach (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 (42)
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.Web.Tests (5)