Class DocumentRendererExtensions
Extension methods for IDocumentRenderer<T>.
Inheritance
- object
- DocumentRendererExtensions
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Declaration
public static class DocumentRendererExtensions
Methods
MapAnnotations<T, U>(IDocumentRenderer<U>, Func<T, ValueTask<U>>)
Creates an IDocumentRenderer<T> which wraps
the specified renderer
by applying an asynchronous
Func<T, TResult> to all of the annotations in
the input Document<T>.
Declaration
public static IDocumentRenderer<T> MapAnnotations<T, U>(this IDocumentRenderer<U> renderer, Func<T, ValueTask<U>> selector)
Parameters
Type | Name | Description |
---|---|---|
renderer |
The wrapped document renderer. |
|
selector |
The function to apply to the annotations. |
Returns
Type | Description |
---|---|
An IDocumentRenderer<T> which wraps an
|
Type Parameters
Name | Description |
---|---|
T |
The type of annotations in the input Document<T>. |
U |
The type of annotations accepted by the wrapped IDocumentRenderer<T>. |
MapAnnotations<T, U>(IDocumentRenderer<U>, Func<T, U>)
Creates an IDocumentRenderer<T> which wraps
the specified renderer
by applying a
Func<T, TResult> to all of the annotations in
the input Document<T>.
Declaration
public static IDocumentRenderer<T> MapAnnotations<T, U>(this IDocumentRenderer<U> renderer, Func<T, U> selector)
Parameters
Type | Name | Description |
---|---|---|
renderer |
The wrapped document renderer. |
|
Func<T, U> |
selector |
The function to apply to the annotations. |
Returns
Type | Description |
---|---|
An IDocumentRenderer<T> which wraps an
|
Type Parameters
Name | Description |
---|---|
T |
The type of annotations in the input Document<T>. |
U |
The type of annotations accepted by the wrapped IDocumentRenderer<T>. |