Class EffectiveConfigSettingZptDocumentRendererDecorator
An entry-point service for ZPT-Sharp. This service renders a model to a document stream and returns the result as a stream.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Rendering
Assembly: ZptSharp.dll
Syntax
public class EffectiveConfigSettingZptDocumentRendererDecorator : IRendersZptDocument
Remarks
Use this service when you wish to perform the ZPT rendering process upon a System.
If you wish to render a file on disk, then you should probably consider using
Zpt
Constructors
| Improve this Doc View SourceEffectiveConfigSettingZptDocumentRendererDecorator(IRendersZptDocument, Type)
Initializes a new instance of the Effective
Declaration
public EffectiveConfigSettingZptDocumentRendererDecorator(IRendersZptDocument wrapped, Type readerWriterType = null)
Parameters
Type | Name | Description |
---|---|---|
IRenders |
wrapped | The wrapped implementation type. |
System. |
readerWriterType | Indicates the document provider implementation type to use for rendering the current document. |
Remarks
If a readerWriterType
is specified in this constructor, then the
Document
Methods
| Improve this Doc View SourceRenderAsync(Stream, Object, RenderingConfig, CancellationToken, IDocumentSourceInfo)
Renders a specified ZPT document from a stream using the specified model.
Declaration
public Task<Stream> RenderAsync(Stream stream, object model, RenderingConfig config = null, CancellationToken token = default(CancellationToken), IDocumentSourceInfo sourceInfo = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
stream | The stream containing the document to render. |
System. |
model | The model to use for the rendering process. |
Rendering |
config | An optional rendering configuration object. |
System. |
token | An object used to cancel the operation if required. |
IDocument |
sourceInfo | The source info for the |
Returns
Type | Description |
---|---|
System. |
A stream containing the rendered document. |
Remarks
There are two ways in which an implementation of IReadsconfig
which has its
Document
If both mechanisms are specified, then the document provider specified via the
Effective