Share via


Renderer.ResolveComponentForRenderMode Method

Definition

Determines how to handle an IComponentRenderMode when obtaining a component instance. This is only called when a render mode is specified either at the call site or on the component type.

Subclasses may override this method to return a component of a different type, or throw, depending on whether the renderer supports the render mode and how it implements that support.

protected internal virtual Microsoft.AspNetCore.Components.IComponent ResolveComponentForRenderMode (Type componentType, int? parentComponentId, Microsoft.AspNetCore.Components.IComponentActivator componentActivator, Microsoft.AspNetCore.Components.IComponentRenderMode renderMode);
abstract member ResolveComponentForRenderMode : Type * Nullable<int> * Microsoft.AspNetCore.Components.IComponentActivator * Microsoft.AspNetCore.Components.IComponentRenderMode -> Microsoft.AspNetCore.Components.IComponent
override this.ResolveComponentForRenderMode : Type * Nullable<int> * Microsoft.AspNetCore.Components.IComponentActivator * Microsoft.AspNetCore.Components.IComponentRenderMode -> Microsoft.AspNetCore.Components.IComponent
Protected Friend Overridable Function ResolveComponentForRenderMode (componentType As Type, parentComponentId As Nullable(Of Integer), componentActivator As IComponentActivator, renderMode As IComponentRenderMode) As IComponent

Parameters

componentType
Type

The type of component that was requested.

parentComponentId
Nullable<Int32>

The parent component ID, or null if it is a root component.

componentActivator
IComponentActivator

An IComponentActivator that should be used when instantiating component objects.

renderMode
IComponentRenderMode

The IComponentRenderMode declared on componentType or at the call site (for example, by the parent component).

Returns

An IComponent instance.

Applies to