Share via


RenderTreeBuilder Class

Definition

Provides methods for building a collection of RenderTreeFrame entries.

public ref class RenderTreeBuilder sealed : IDisposable
public sealed class RenderTreeBuilder : IDisposable
type RenderTreeBuilder = class
    interface IDisposable
Public NotInheritable Class RenderTreeBuilder
Implements IDisposable
Inheritance
RenderTreeBuilder
Implements

Constructors

RenderTreeBuilder()

Methods

AddAttribute(Int32, RenderTreeFrame)

Appends a frame representing an attribute.

The attribute is associated with the most recently added element.

AddAttribute(Int32, RenderTreeFrame)

Appends a frame representing an attribute.

The attribute is associated with the most recently added element.

AddAttribute(Int32, String, Boolean)

Appends a frame representing a bool-valued attribute.

The attribute is associated with the most recently added element. If the value is false and the current element is not a component, the frame will be omitted.

AddAttribute(Int32, String, EventCallback)

Appends a frame representing an EventCallback attribute.

The attribute is associated with the most recently added element. If the value is null and the current element is not a component, the frame will be omitted.

AddAttribute(Int32, String, MulticastDelegate)

Appends a frame representing a delegate-valued attribute.

The attribute is associated with the most recently added element. If the value is null and the current element is not a component, the frame will be omitted.

AddAttribute(Int32, String, Object)

Appends a frame representing a string-valued attribute. The attribute is associated with the most recently added element. If the value is null, or the Boolean value false and the current element is not a component, the frame will be omitted.

AddAttribute(Int32, String, String)

Appends a frame representing a string-valued attribute.

The attribute is associated with the most recently added element. If the value is null and the current element is not a component, the frame will be omitted.

AddAttribute(Int32, String)

Appends a frame representing a bool-valued attribute with value 'true'.

The attribute is associated with the most recently added element.

AddAttribute<TArgument>(Int32, String, EventCallback<TArgument>)

Appends a frame representing an EventCallback attribute.

The attribute is associated with the most recently added element. If the value is null and the current element is not a component, the frame will be omitted.

AddComponentParameter(Int32, String, Object)

Appends a frame representing a component parameter.

AddComponentReferenceCapture(Int32, Action<Object>)

Appends a frame representing an instruction to capture a reference to the parent component.

AddComponentRenderMode(IComponentRenderMode)

Adds a frame indicating the render mode on the enclosing component frame.

AddContent(Int32, MarkupString)

Appends a frame representing markup content.

AddContent(Int32, Nullable<MarkupString>)

Appends a frame representing markup content.

AddContent(Int32, Object)

Appends a frame representing text content.

AddContent(Int32, RenderFragment)

Appends frames representing an arbitrary fragment of content.

AddContent(Int32, String)

Appends a frame representing text content.

AddContent<TValue>(Int32, RenderFragment<TValue>, TValue)

Appends frames representing an arbitrary fragment of content.

AddElementReferenceCapture(Int32, Action<ElementReference>)

Appends a frame representing an instruction to capture a reference to the parent element.

AddMarkupContent(Int32, String)

Appends a frame representing markup content.

AddMultipleAttributes(Int32, IEnumerable<KeyValuePair<String,Object>>)

Adds frames representing multiple attributes with the same sequence number.

AddNamedEvent(String, String)

Assigns a name to an event in the enclosing element.

Clear()

Clears the builder.

CloseComponent()

Marks a previously appended component frame as closed. Calls to this method must be balanced with calls to OpenComponent<TComponent>(Int32).

CloseElement()

Marks a previously appended element frame as closed. Calls to this method must be balanced with calls to OpenElement(Int32, String).

CloseRegion()

Marks a previously appended region frame as closed. Calls to this method must be balanced with calls to OpenRegion(Int32).

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetFrames()

Returns the RenderTreeFrame values that have been appended.

OpenComponent(Int32, Type)

Appends a frame representing a child component.

OpenComponent<TComponent>(Int32)

Appends a frame representing a child component.

OpenElement(Int32, String)

Appends a frame representing an element, i.e., a container for other frames. In order for the RenderTreeBuilder state to be valid, you must also call CloseElement() immediately after appending the new element's child frames.

OpenRegion(Int32)

Appends a frame representing a region of frames.

SetKey(Object)

Assigns the specified key value to the current element or component.

SetUpdatesAttributeName(String)

Indicates that the preceding attribute represents an event handler whose execution updates the attribute with name updatesAttributeName.

This information is used by the rendering system to determine whether to accept a value update for the other attribute when receiving a call to the event handler.

Explicit Interface Implementations

IDisposable.Dispose()

Extension Methods

AddEventPreventDefaultAttribute(RenderTreeBuilder, Int32, String, Boolean)

Appends a frame representing an instruction to prevent the default action for a specified event.

AddEventStopPropagationAttribute(RenderTreeBuilder, Int32, String, Boolean)

Appends a frame representing an instruction to stop the specified event from propagating beyond the current element.

Applies to