Class ModuleViewEngineCollection
A view engine composed of module view engines. The view engine will defer work to a contained view engine belonging to the requesting module.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Shell.Web.Mvc
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
public class ModuleViewEngineCollection : IViewEngine, IEnumerable<IViewEngine>, IEnumerable
Constructors
ModuleViewEngineCollection()
Declaration
public ModuleViewEngineCollection()
Methods
Add(String, IViewEngine)
Adds a view engine to the internal view engine collection
Declaration
public void Add(string name, IViewEngine viewEngine)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Web.Mvc.IViewEngine | viewEngine |
FindPartialView(ControllerContext, String, Boolean)
Finds a partial view when the route data tokens contains a module.
Declaration
public ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ControllerContext | controllerContext | The controller context. |
System.String | partialViewName | Partial name of the view. |
System.Boolean | useCache | if set to |
Returns
Type | Description |
---|---|
System.Web.Mvc.ViewEngineResult |
FindView(ControllerContext, String, String, Boolean)
Finds a view when the route data tokens contains a module.
Declaration
public ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ControllerContext | controllerContext | The controller context. |
System.String | viewName | Name of the view. |
System.String | masterName | Name of the master. |
System.Boolean | useCache | if set to |
Returns
Type | Description |
---|---|
System.Web.Mvc.ViewEngineResult | A decorated result or empty list when not one of our modules. |
GetEnumerator()
Returns an enumerator that iterates through the view engines.
Declaration
public IEnumerator<IViewEngine> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Web.Mvc.IViewEngine> | A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
ReleaseView(ControllerContext, IView)
Releases the view if the route data tokens contains a module.
Declaration
public void ReleaseView(ControllerContext controllerContext, IView view)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ControllerContext | controllerContext | The controller context. |
System.Web.Mvc.IView | view | The view. |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Overrides
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |