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>();
173/// Gets the <see cref="ComponentState"/> associated with the specified component.
176/// <returns>The corresponding <see cref="ComponentState"/>.</returns>
177protected ComponentState GetComponentState(int componentId)
196protected internal ComponentState GetComponentState(IComponent component)
229var componentState = GetRequiredComponentState(componentId);
325var componentState = GetRequiredRootComponentState(componentId);
418private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
421var parentComponentState = GetOptionalComponentState(parentComponentId);
422var componentState = CreateComponentState(componentId, component, parentComponentState);
428internal void RegisterComponentState(IComponent component, int componentId, ComponentState componentState)
435/// Creates a <see cref="ComponentState"/> instance to track state associated with a newly-instantiated component.
437/// may override this method to use their own subclasses of <see cref="ComponentState"/>.
441/// <param name="parentComponentState">The <see cref="ComponentState"/> associated with the parent component, or null if this is a root component.</param>
442/// <returns>A <see cref="ComponentState"/> for the new component.</returns>
443protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
521ComponentState? receiverComponentState = null;
617internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
635var newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
666internal void AddToPendingTasksWithErrorHandling(Task task, ComponentState? owningComponentState)
698/// <param name="componentState">The <see cref="ComponentState"/> for the component associated with this pending task, if any.</param>
700protected virtual void AddPendingTask(ComponentState? componentState, Task task)
750var componentState = GetOptionalComponentState(componentId);
795internal ComponentState GetRequiredComponentState(int componentId)
796=> _componentStateById.TryGetValue(componentId, out var componentState)
800private ComponentState? GetOptionalComponentState(int componentId)
801=> _componentStateById.TryGetValue(componentId, out var componentState)
805private ComponentState GetRequiredRootComponentState(int componentId)
807var componentState = GetRequiredComponentState(componentId);
943var componentState = GetOptionalComponentState(array[i].ComponentId);
978var componentState = GetOptionalComponentState(array[i]);
992private void NotifyRenderCompleted(ComponentState state, ref List<Task> batch)
1027var componentState = renderQueueEntry.ComponentState;
1047var disposeComponentState = GetRequiredComponentState(disposeComponentId);
1147private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState)
1165var componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1182private void HandleExceptionViaErrorBoundary(Exception error, ComponentState? errorSourceOrNull)
1198var candidate = errorSourceOrNull;
1280foreach (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)