1 write to Component
Microsoft.AspNetCore.Components (1)
Rendering\ComponentState.cs (1)
39
Component
= component ?? throw new ArgumentNullException(nameof(component));
61 references to Component
Microsoft.AspNetCore.Components (34)
CascadingParameterState.cs (2)
29
var componentType = componentState.
Component
.GetType();
82
if (candidate.
Component
is ICascadingValueSupplier valueSupplier && valueSupplier.CanSupplyValue(info))
ComponentSubscriptionKey.cs (1)
26
=> $"{Subscriber.
Component
.GetType().Name}.{PropertyName}";
PersistentState\PersistentStateValueProviderKeyResolver.cs (4)
165
private static string GetComponentType(ComponentState componentState) => componentState.
Component
.GetType().FullName!;
173
if (componentState.ParentComponentState.
Component
== null)
181
var parentRenderMode = renderer.GetComponentRenderMode(componentState.ParentComponentState.
Component
);
182
var grandParentRenderMode = renderer.GetComponentRenderMode(componentState.ParentComponentState.ParentComponentState.
Component
);
PersistentState\PersistentValueProviderComponentSubscription.cs (7)
66
_propertyGetter = _propertyGetterCache.GetOrAdd((subscriber.
Component
.GetType(), _propertyName), PropertyGetterFactory);
70
subscriber.Renderer.GetComponentRenderMode(subscriber.
Component
));
111
var currentPropertyValue = _propertyGetter.GetValue(_subscriber.
Component
);
185
var property = _propertyGetter.GetValue(_subscriber.
Component
);
188
Log.SkippedPersistingNullValue(_logger, _storageKey, _propertyType.Name, _subscriber.
Component
.GetType().Name, _propertyName);
194
Log.PersistingValueToState(_logger, _storageKey, _propertyType.Name, _subscriber.
Component
.GetType().Name, _propertyName);
203
Log.PersistingValueToState(_logger, _storageKey, _propertyType.Name, _subscriber.
Component
.GetType().Name, _propertyName);
Rendering\ComponentState.cs (8)
41
? (GetSectionOutletLogicalParent(renderer, (SectionOutlet)parentComponentState!.
Component
) ?? parentComponentState)
130
_nextRenderTree.AssertTreeIsValid(
Component
);
148
if (
Component
is IHandleAfterRender handlerAfterRender)
251
setParametersAsyncTask =
Component
.SetParametersAsync(directAndCascadingParameters);
316
if (
Component
is IAsyncDisposable asyncDisposable)
322
(
Component
as IDisposable)?.Dispose();
368
!ReferenceEquals(
Component
, currentFrame.Component))
382
return $"ComponentId = {ComponentId}, Type = {
Component
.GetType().Name}, Disposed = {_componentWasDisposed}";
Rendering\RenderQueueEntry.cs (1)
22
return $"ComponentId = {ComponentState.ComponentId}, Type = {ComponentState.
Component
.GetType().Name}";
RenderTree\Renderer.cs (4)
162
=> GetComponentRenderMode(GetRequiredComponentState(componentId).
Component
);
336
=> GetRequiredRootComponentState(componentId).
Component
.GetType();
1051
_componentStateByComponent.Remove(disposeComponentState.
Component
);
1167
if (candidate.
Component
is IErrorBoundary errorBoundary)
RenderTree\Renderer.Log.cs (5)
25
InitializingRootComponent(logger, componentState.ComponentId, componentState.
Component
.GetType());
29
InitializingChildComponent(logger, componentState.ComponentId, componentState.
Component
.GetType(), parentComponentState.ComponentId, parentComponentState.
Component
.GetType());
41
RenderingComponent(logger, componentState.ComponentId, componentState.
Component
.GetType());
52
DisposingComponent(logger, componentState.ComponentId, componentState.
Component
.GetType());
RenderTree\RenderTreeDiffBuilder.cs (1)
785
var componentType = currentComponentState.
Component
.GetType();
RenderTree\RenderTreeFrame.cs (1)
189
public IComponent Component => ComponentStateField?.
Component
;
Microsoft.AspNetCore.Components.Endpoints (5)
Rendering\EndpointComponentState.cs (1)
52
if (ParentComponentState != null && ParentComponentState.
Component
is SSRRenderModeBoundary boundary)
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
268
static string GetName(ComponentState current) => current.
Component
.GetType().Name;
Rendering\EndpointHtmlRenderer.Prerendering.cs (2)
70
if (currentComponentState.
Component
is SSRRenderModeBoundary boundary)
311
if (boundaryComponentState is null || boundaryComponentState.
Component
is not SSRRenderModeBoundary boundary)
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
277
if (componentState.
Component
is SSRRenderModeBoundary boundary)
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteRenderer.cs (1)
85
GetComponentState(componentId).
Component
.GetType();
Microsoft.AspNetCore.Components.Server.Tests (9)
Circuits\CircuitHostTest.cs (9)
541
var component = Assert.IsType<DynamicallyAddedComponent>(componentState.
Component
);
567
var component = Assert.IsType<DynamicallyAddedComponent>(componentState.
Component
);
594
var component = Assert.IsType<DynamicallyAddedComponent>(componentState.
Component
);
628
var component = Assert.IsType<DynamicallyAddedComponent>(componentState.
Component
);
665
var component = Assert.IsType<DynamicallyAddedComponent>(componentState.
Component
);
767
var dynamicallyAddedComponent1 = Assert.IsType<DynamicallyAddedComponent>(testRenderer.GetTestComponentState(3).
Component
);
770
var dynamicallyAddedComponent2 = Assert.IsType<DynamicallyAddedComponent>(testRenderer.GetTestComponentState(2).
Component
);
779
Assert.Equal("Replaced Component 1", Assert.IsType<DynamicallyAddedComponent>(testRenderer.GetTestComponentState(3).
Component
).Message);
780
Assert.Equal("New Component 2", Assert.IsType<DynamicallyAddedComponent>(testRenderer.GetTestComponentState(2).
Component
).Message);
Microsoft.AspNetCore.Components.Tests (12)
CascadingParameterStateTest.cs (12)
85
Assert.Same(states[1].
Component
, match.ValueSupplier);
108
Assert.Same(states[3].
Component
, match.ValueSupplier);
113
Assert.Same(states[1].
Component
, match.ValueSupplier);
134
Assert.Same(states[0].
Component
, match.ValueSupplier);
139
Assert.Same(states[1].
Component
, match.ValueSupplier);
158
Assert.Same(states[0].
Component
, match.ValueSupplier);
177
Assert.Same(states[0].
Component
, match.ValueSupplier);
211
Assert.Same(states[0].
Component
, match.ValueSupplier);
305
Assert.Same(states[0].
Component
, match.ValueSupplier);
328
Assert.Same(states[2].
Component
, match.ValueSupplier);
333
Assert.Same(states[3].
Component
, match.ValueSupplier);
354
Assert.Same(states[1].
Component
, match.ValueSupplier);