Class ZptSharpSelfHoster
An implementation of IHostsZptSharp which wraps an System.IServiceProvider and uses that to provide the entry-points.
Inheritance
Inherited Members
Namespace: ZptSharp.Hosting
Assembly: ZptSharp.dll
Syntax
public class ZptSharpSelfHoster : IHostsZptSharp, IDisposable
Constructors
| Improve this Doc View SourceZptSharpSelfHoster(IServiceProvider)
Initializes an instance of ZptSharpSelfHoster.
Declaration
public ZptSharpSelfHoster(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider | A service provider. |
Properties
| Improve this Doc View SourceBulkRenderer
Gets a service which renders many template files at once and saves the output to disk.
Declaration
public IRendersManyFiles BulkRenderer { get; }
Property Value
Type | Description |
---|---|
IRendersManyFiles | The bulk renderer. |
DocumentRendererForPathFactory
Gets a service which may be used to create an instance of IRendersZptDocument, suitable for use with a given file path. The file path will be used to detect the type of document.
Note that if you wish to render a template from disk, then it is easier to use FileRenderer instead. This service is appropriate when the file path might not exist, but a stream is being provided for the template document anyway.
Declaration
public IGetsZptDocumentRendererForFilePath DocumentRendererForPathFactory { get; }
Property Value
Type | Description |
---|---|
IGetsZptDocumentRendererForFilePath | The document renderer factory for file paths. |
FileRenderer
Gets a service which renders ZPT template files from disk paths.
Declaration
public IRendersZptFile FileRenderer { get; }
Property Value
Type | Description |
---|---|
IRendersZptFile | The file renderer. |
ServiceProvider
Gets the underlying service provider from which the current hosting environment is built.
Declaration
public IServiceProvider ServiceProvider { get; }
Property Value
Type | Description |
---|---|
System.IServiceProvider | The service provider. |
StreamCopier
Gets a service which copies a System.IO.Stream to a System.IO.TextWriter.
Declaration
public IWritesStreamToTextWriter StreamCopier { get; }
Property Value
Type | Description |
---|---|
IWritesStreamToTextWriter | The stream-copying service. |
Methods
| Improve this Doc View SourceDispose()
Dispose of the current instance and release its resources.
Declaration
public void Dispose()
Dispose(Boolean)
Dispose the current instance.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | If |