WebRenderer Class

Definition

A Renderer that attaches its components to a browser DOM.

public abstract class WebRenderer : Microsoft.AspNetCore.Components.RenderTree.Renderer
type WebRenderer = class
    inherit Renderer
Public MustInherit Class WebRenderer
Inherits Renderer
Inheritance
WebRenderer

Constructors

WebRenderer(IServiceProvider, ILoggerFactory, JsonSerializerOptions, JSComponentInterop)

Constructs an instance of WebRenderer.

Properties

Dispatcher

Gets the Dispatcher associated with this Renderer.

(Inherited from Renderer)
ElementReferenceContext

Gets or sets the ElementReferenceContext associated with this Renderer, if it exists.

(Inherited from Renderer)
RendererId
Obsolete.

Gets the identifier for the renderer.

Methods

AddPendingTask(ComponentState, Task)

Notifies the renderer that there is a pending task associated with a component. The renderer is regarded as quiescent when all such tasks have completed.

(Inherited from Renderer)
AddRootComponent(Type, String)

Instantiates a root component and attaches it to the browser within the specified element.

AssignRootComponentId(IComponent)

Associates the IComponent with the Renderer, assigning an identifier that is unique within the scope of the Renderer.

(Inherited from Renderer)
AttachRootComponentToBrowser(Int32, String)

Called by the framework to give a location for the specified root component in the browser DOM.

CreateComponentState(Int32, IComponent, ComponentState)

Creates a ComponentState instance to track state associated with a newly-instantiated component. This is called before the component is initialized and tracked within the Renderer. Subclasses may override this method to use their own subclasses of ComponentState.

(Inherited from Renderer)
DispatchEventAsync(UInt64, EventFieldInfo, EventArgs)

Notifies the renderer that an event has occurred.

(Inherited from Renderer)
DispatchEventAsync(UInt64, EventFieldInfo, EventArgs, Boolean)

Notifies the renderer that an event has occurred.

(Inherited from Renderer)
Dispose()

Releases all resources currently used by this Renderer instance.

(Inherited from Renderer)
Dispose(Boolean)

Releases all resources currently used by this Renderer instance.

DisposeAsync() (Inherited from Renderer)
GetComponentRenderMode(IComponent)

Gets the IComponentRenderMode for a given component if available.

(Inherited from Renderer)
GetComponentState(IComponent)

Resolves the component state for a given IComponent instance.

(Inherited from Renderer)
GetComponentState(Int32)

Gets the ComponentState associated with the specified component.

(Inherited from Renderer)
GetCurrentRenderTreeFrames(Int32)

Gets the current render tree for a given component.

(Inherited from Renderer)
GetEventArgsType(UInt64)

Gets the event arguments type for the specified event handler.

(Inherited from Renderer)
GetWebRendererId()

Allocates an identifier for the renderer.

HandleException(Exception)

Allows derived types to handle exceptions during rendering. Defaults to rethrowing the original exception.

(Inherited from Renderer)
InstantiateComponent(Type)

Constructs a new component of the specified type.

(Inherited from Renderer)
ProcessPendingRender()

Processes pending renders requests from components if there are any.

(Inherited from Renderer)
RemoveRootComponent(Int32)

Removes the specified component from the renderer, causing the component and its descendants to be disposed.

(Inherited from Renderer)
RenderRootComponentAsync(Int32)

Performs the first render for a root component, waiting for this component and all children components to finish rendering in case there is any asynchronous work being done by any of the components. After this, the root component makes its own decisions about when to re-render, so there is no need to call this more than once.

(Inherited from Renderer)
RenderRootComponentAsync(Int32, ParameterView)

Supplies parameters for a root component, normally causing it to render. This can be used to trigger the first render of a root component, or to update its parameters and trigger a subsequent render. Note that components may also make their own decisions about when to re-render, and may re-render at any time.

The returned Task waits for this component and all descendant components to finish rendering in case there is any asynchronous work being done by any of them.

(Inherited from Renderer)
ResolveComponentForRenderMode(Type, Nullable<Int32>, IComponentActivator, IComponentRenderMode)

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.

(Inherited from Renderer)
UpdateDisplayAsync(RenderBatch)

Updates the visible UI.

(Inherited from Renderer)

Events

UnhandledSynchronizationException

Allows the caller to handle exceptions from the SynchronizationContext when one is available.

(Inherited from Renderer)

Applies to