1 write to Component
Microsoft.AspNetCore.Components (1)
Rendering\ComponentState.cs (1)
38Component = component ?? throw new ArgumentNullException(nameof(component));
48 references to Component
Microsoft.AspNetCore.Components (27)
CascadingParameterState.cs (2)
29var componentType = componentState.Component.GetType(); 82if (candidate.Component is ICascadingValueSupplier valueSupplier && valueSupplier.CanSupplyValue(info))
Rendering\ComponentState.cs (7)
40? (GetSectionOutletLogicalParent(renderer, (SectionOutlet)parentComponentState!.Component) ?? parentComponentState) 119_nextRenderTree.AssertTreeIsValid(Component); 137if (Component is IHandleAfterRender handlerAfterRender) 238setParametersAsyncTask = Component.SetParametersAsync(directAndCascadingParameters); 292if (Component is IAsyncDisposable asyncDisposable) 298(Component as IDisposable)?.Dispose(); 325return $"ComponentId = {ComponentId}, Type = {Component.GetType().Name}, Disposed = {_componentWasDisposed}";
Rendering\RenderQueueEntry.cs (1)
22return $"ComponentId = {ComponentState.ComponentId}, Type = {ComponentState.Component.GetType().Name}";
RenderTree\Renderer.cs (6)
152=> GetComponentRenderMode(GetRequiredComponentState(componentId).Component); 326=> GetRequiredRootComponentState(componentId).Component.GetType(); 936_renderingMetrics?.RenderStart(componentState.Component.GetType().FullName); 943_renderingMetrics?.RenderEnd(componentState.Component.GetType().FullName, renderFragmentException, startTime, Stopwatch.GetTimestamp()); 993_componentStateByComponent.Remove(disposeComponentState.Component); 1109if (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;
SupplyParameterFromPersistentComponentStateValueProvider.cs (5)
56var propertyGetter = ResolvePropertyGetter(subscriber.Component.GetType(), propertyName); 57var property = propertyGetter.GetValue(subscriber.Component); 64}, subscriber.Renderer.GetComponentRenderMode(subscriber.Component)); 235!ReferenceEquals(componentState.Component, currentFrame.Component)) 248private static string GetComponentType(ComponentState componentState) => componentState.Component.GetType().FullName!;
Microsoft.AspNetCore.Components.Endpoints (3)
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
211static string GetName(ComponentState current) => current.Component.GetType().Name;
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
68if (currentComponentState.Component is SSRRenderModeBoundary boundary)
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
265if (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);