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)
5 instantiations of ComponentState
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (3)
178 references to ComponentState
Microsoft.AspNetCore.Components (96)
RenderTree\Renderer.cs (43)
31private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>();
32private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>();
140/// Gets the <see cref="ComponentState"/> associated with the specified component.
143/// <returns>The corresponding <see cref="ComponentState"/>.</returns>
144protected ComponentState GetComponentState(int componentId)
163protected internal ComponentState GetComponentState(IComponent component)
195var componentState = GetRequiredComponentState(componentId);
285var componentState = GetRequiredRootComponentState(componentId);
378private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
381var parentComponentState = GetOptionalComponentState(parentComponentId);
382var componentState = CreateComponentState(componentId, component, parentComponentState);
388internal void RegisterComponentState(IComponent component, int componentId, ComponentState componentState)
395/// Creates a <see cref="ComponentState"/> instance to track state associated with a newly-instantiated component.
397/// may override this method to use their own subclasses of <see cref="ComponentState"/>.
401/// <param name="parentComponentState">The <see cref="ComponentState"/> associated with the parent component, or null if this is a root component.</param>
402/// <returns>A <see cref="ComponentState"/> for the new component.</returns>
403protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
481ComponentState? receiverComponentState = null;
577internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId)
595var newComponentState = AttachAndInitComponent(newComponent, parentComponentId);
626internal void AddToPendingTasksWithErrorHandling(Task task, ComponentState? owningComponentState)
658/// <param name="componentState">The <see cref="ComponentState"/> for the component associated with this pending task, if any.</param>
660protected virtual void AddPendingTask(ComponentState? componentState, Task task)
710var componentState = GetOptionalComponentState(componentId);
755private ComponentState GetRequiredComponentState(int componentId)
756=> _componentStateById.TryGetValue(componentId, out var componentState)
760private ComponentState? GetOptionalComponentState(int componentId)
761=> _componentStateById.TryGetValue(componentId, out var componentState)
765private ComponentState GetRequiredRootComponentState(int componentId)
767var componentState = GetRequiredComponentState(componentId);
903var componentState = GetOptionalComponentState(array[i].ComponentId);
938var componentState = GetOptionalComponentState(array[i]);
952private void NotifyRenderCompleted(ComponentState state, ref List<Task> batch)
987var componentState = renderQueueEntry.ComponentState;
1007var disposeComponentState = GetRequiredComponentState(disposeComponentId);
1107private async Task GetErrorHandledTask(Task taskToHandle, ComponentState? owningComponentState)
1125var componentState = GetOptionalComponentState(fieldInfo.ComponentId);
1142private void HandleExceptionViaErrorBoundary(Exception error, ComponentState? errorSourceOrNull)
1158var candidate = errorSourceOrNull;
1240foreach (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 (43)
SupplyParameterFromPersistentComponentStateValueProviderTests.cs (23)
32var componentState = componentStates.First();
36new List<(ComponentState, string, string)>
59var componentState = componentStates.First();
81var componentState = componentStates.First();
107var componentState = componentStates.First();
146var componentState = componentStates.First();
185var componentState1 = componentStates.First();
186var componentState2 = componentStates.Last();
258var componentState1 = componentStates.First();
259var componentState2 = componentStates.Last();
303var componentState1 = componentStates.First();
304var componentState2 = componentStates.Last();
344var componentState1 = componentStates.First();
345var componentState2 = componentStates.Last();
377var componentState1 = componentStates.First();
378var componentState2 = componentStates.Last();
417var componentState1 = componentStates.First();
418var componentState2 = componentStates.Last();
434private static void InitializeState(PersistentComponentState state, List<(ComponentState componentState, string propertyName, string value)> items)
453private static List<ComponentState> CreateComponentState(
459var parentComponentState = parentComponent != null ? new ComponentState(renderer, i++, parentComponent, null) : null;
461var result = new List<ComponentState>();
464var componentState = new ComponentState(renderer, i++, component, parentComponentState);
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.Web.Tests (5)