Class ZptFileRenderer
Implementation of IRendersZptFile which uses an IRendersZptDocument from a factory. It also uses an IGetsDocumentReaderWriterForFile to attempt to get the appropriate document reader/writer for the file.
Inheritance
System.Object
ZptFileRenderer
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp
Assembly: ZptSharp.dll
Syntax
public class ZptFileRenderer : IRendersZptFile
Constructors
| Improve this Doc View SourceZptFileRenderer(IServiceProvider)
Initializes a new instance of the ZptFileRenderer class.
Declaration
public ZptFileRenderer(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider | Service provider. |
Methods
| Improve this Doc View SourceRenderAsync(String, Object, RenderingConfig, CancellationToken)
Renders a specified ZPT document file using the specified model.
Declaration
public Task<Stream> RenderAsync(string filePath, object model, RenderingConfig config = null, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The path of the document file to render. |
System.Object | model | The model to use for the rendering process. |
RenderingConfig | config | An optional rendering configuration object. |
System.Threading.CancellationToken | token | An object used to cancel the operation if required. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> | A stream containing the rendered document. |