1 write to Component
Microsoft.AspNetCore.Components (1)
Rendering\ComponentState.cs (1)
38Component = component ?? throw new ArgumentNullException(nameof(component));
41 references to Component
Microsoft.AspNetCore.Components (20)
CascadingParameterState.cs (2)
30var componentType = componentState.Component.GetType(); 83if (candidate.Component is ICascadingValueSupplier valueSupplier && valueSupplier.CanSupplyValue(info))
Rendering\ComponentState.cs (7)
40? (GetSectionOutletLogicalParent(renderer, (SectionOutlet)parentComponentState!.Component) ?? parentComponentState) 117_nextRenderTree.AssertTreeIsValid(Component); 135if (Component is IHandleAfterRender handlerAfterRender) 236setParametersAsyncTask = Component.SetParametersAsync(directAndCascadingParameters); 290if (Component is IAsyncDisposable asyncDisposable) 296(Component as IDisposable)?.Dispose(); 323return $"ComponentId = {ComponentId}, Type = {Component.GetType().Name}, Disposed = {_componentWasDisposed}";
Rendering\RenderQueueEntry.cs (1)
22return $"ComponentId = {ComponentState.ComponentId}, Type = {ComponentState.Component.GetType().Name}";
RenderTree\Renderer.cs (4)
146=> GetComponentRenderMode(GetRequiredComponentState(componentId).Component); 320=> GetRequiredRootComponentState(componentId).Component.GetType(); 980_componentStateByComponent.Remove(disposeComponentState.Component); 1096if (candidate.Component is IErrorBoundary errorBoundary)
RenderTree\Renderer.Log.cs (5)
25InitializingRootComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 29InitializingChildComponent(logger, componentState.ComponentId, componentState.Component.GetType(), parentComponentState.ComponentId, parentComponentState.Component.GetType()); 41RenderingComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 52DisposingComponent(logger, componentState.ComponentId, componentState.Component.GetType());
RenderTree\RenderTreeFrame.cs (1)
189public IComponent Component => ComponentStateField?.Component;
Microsoft.AspNetCore.Components.Endpoints (3)
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
201static string GetName(ComponentState current) => current.Component.GetType().Name;
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
68if (currentComponentState.Component is SSRRenderModeBoundary boundary)
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
264if (componentState.Component is SSRRenderModeBoundary boundary)
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteRenderer.cs (1)
84GetComponentState(componentId).Component.GetType();
Microsoft.AspNetCore.Components.Server.Tests (5)
Circuits\CircuitHostTest.cs (5)
432var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 458var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 485var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 519var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 556var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component);
Microsoft.AspNetCore.Components.Tests (12)
CascadingParameterStateTest.cs (12)
85Assert.Same(states[1].Component, match.ValueSupplier); 108Assert.Same(states[3].Component, match.ValueSupplier); 113Assert.Same(states[1].Component, match.ValueSupplier); 134Assert.Same(states[0].Component, match.ValueSupplier); 139Assert.Same(states[1].Component, match.ValueSupplier); 158Assert.Same(states[0].Component, match.ValueSupplier); 177Assert.Same(states[0].Component, match.ValueSupplier); 211Assert.Same(states[0].Component, match.ValueSupplier); 305Assert.Same(states[0].Component, match.ValueSupplier); 328Assert.Same(states[2].Component, match.ValueSupplier); 333Assert.Same(states[3].Component, match.ValueSupplier); 354Assert.Same(states[1].Component, match.ValueSupplier);