Class ZptSharpView
The ZptSharp implementation of an System.Web.Mvc.IView for either MVC5 or MVC Core.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Mvc5
Assembly: ZptSharp.Mvc5.dll
Syntax
public class ZptSharpView : IView
Constructors
| Improve this Doc View SourceZptSharpView(String, IHostsZptSharp, String, RenderingConfig, IGetsMvcRenderingConfig, IGetsErrorStream)
Initializes a new instance of the ZptSharpView class.
Declaration
public ZptSharpView(string filePath, IHostsZptSharp host, string viewsPath, RenderingConfig config, IGetsMvcRenderingConfig configProvider, IGetsErrorStream errorStreamProvider)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The path to the view file which is to be rendered. |
IHostsZptSharp | host | The self-hosting ZptSharp environment. |
System.String | viewsPath | The path to the root of the |
RenderingConfig | config | A rendering config. |
IGetsMvcRenderingConfig | configProvider | A service which gets a modified rendering config, suitable for use with MVC. |
IGetsErrorStream | errorStreamProvider | A service which gets a stream for displaying a rendering error. |
Properties
| Improve this Doc View SourceHost
The ZptSharp self-hosting environment, from which dependencies are retrieved.
Declaration
public IHostsZptSharp Host { get; }
Property Value
Type | Description |
---|---|
IHostsZptSharp | The self-hosting environment. |
Path
Gets the path of the view as resolved by the ZptSharpViewEngine
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
System.String | The path to the view. |
ViewsPath
The path for the Views
TALES variable.
Declaration
public string ViewsPath { get; }
Property Value
Type | Description |
---|---|
System.String | The views path. |
Methods
| Improve this Doc View SourceRender(ViewContext, TextWriter)
Renders the specified view context by using the specified the writer object.
Declaration
public void Render(ViewContext viewContext, TextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ViewContext | viewContext | The view context. |
System.IO.TextWriter | writer | The writer object. |