3 types derived from ComponentState
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.WebAssembly (1)
1 instantiation of ComponentState
Microsoft.AspNetCore.Components (1)
133 references to ComponentState
Microsoft.AspNetCore.Components (105)
RenderTree\Renderer.cs (43)
34private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>();
35private 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>
163protected ComponentState GetComponentState(int componentId)
182protected internal ComponentState GetComponentState(IComponent component)
215var componentState = GetRequiredComponentState(componentId);
310var componentState = GetRequiredRootComponentState(componentId);
403private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
406var parentComponentState = GetOptionalComponentState(parentComponentId);
407var componentState = CreateComponentState(componentId, component, parentComponentState);
413internal 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>
428protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
506ComponentState? receiverComponentState = null;
602internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
620var newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
651internal 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>
685protected virtual void AddPendingTask(ComponentState? componentState, Task task)
735var componentState = GetOptionalComponentState(componentId);
780internal ComponentState GetRequiredComponentState(int componentId)
781=> _componentStateById.TryGetValue(componentId, out var componentState)
785private ComponentState? GetOptionalComponentState(int componentId)
786=> _componentStateById.TryGetValue(componentId, out var componentState)
790private ComponentState GetRequiredRootComponentState(int componentId)
792var componentState = GetRequiredComponentState(componentId);
928var componentState = GetOptionalComponentState(array[i].ComponentId);
963var componentState = GetOptionalComponentState(array[i]);
977private void NotifyRenderCompleted(ComponentState state, ref List<Task> batch)
1012var componentState = renderQueueEntry.ComponentState;
1032var disposeComponentState = GetRequiredComponentState(disposeComponentId);
1132private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState)
1150var componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1167private void HandleExceptionViaErrorBoundary(Exception error, ComponentState? errorSourceOrNull)
1183var candidate = errorSourceOrNull;
1265foreach (var componentState in _componentStateById.Values)
Microsoft.AspNetCore.Components.Endpoints (15)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.WebAssembly (3)