StaticHtmlRenderer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A Renderer subclass that is intended for static HTML rendering. Application developers should not normally use this class directly. Instead, use HtmlRenderer for a more convenient API.
public class StaticHtmlRenderer : Microsoft.AspNetCore.Components.RenderTree.Renderer
type StaticHtmlRenderer = class
inherit Renderer
Public Class StaticHtmlRenderer
Inherits Renderer
- Inheritance
Constructors
StaticHtmlRenderer(IServiceProvider, ILoggerFactory) |
Constructs an instance of StaticHtmlRenderer. |
Properties
Assets |
Gets the ResourceAssetCollection associated with this Renderer. (Inherited from Renderer) |
Dispatcher |
Gets the Dispatcher associated with this Renderer. |
ElementReferenceContext |
Gets or sets the ElementReferenceContext associated with this Renderer, if it exists. (Inherited from Renderer) |
RendererInfo |
Gets the RendererInfo associated with this Renderer. |
RendererInfo |
Gets the RendererInfo associated with this Renderer. (Inherited from 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) |
AssignRootComponentId(IComponent) |
Associates the IComponent with the Renderer, assigning an identifier that is unique within the scope of the Renderer. (Inherited from Renderer) |
BeginRenderingComponent(IComponent, ParameterView) |
Adds a root component and begins rendering it. |
BeginRenderingComponent(Type, ParameterView) |
Adds a root component of the specified type and begins rendering it. |
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, Boolean) |
Notifies the renderer that an event has occurred. (Inherited from Renderer) |
DispatchEventAsync(UInt64, EventFieldInfo, EventArgs) |
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. (Inherited from Renderer) |
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) |
HandleException(Exception) |
Allows derived types to handle exceptions during rendering. Defaults to rethrowing the original exception. |
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) |
RenderChildComponent(TextWriter, RenderTreeFrame) |
Renders the specified component frame as HTML to the output. |
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) |
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) |
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) |
TryCreateScopeQualifiedEventName(Int32, String, String) |
Creates the fully scope-qualified name for a named event, if the component is within a FormMappingContext (whether or not that mapping context is named). |
UpdateDisplayAsync(RenderBatch) |
Updates the visible UI. |
WriteComponentHtml(Int32, TextWriter) |
Renders the specified component as HTML to the output. |
Events
UnhandledSynchronizationException |
Allows the caller to handle exceptions from the SynchronizationContext when one is available. (Inherited from Renderer) |