Class TemplateConventions
Inheritance
System.Object
TemplateConventions
Namespace: EPiServer.Scanning.Internal
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3Syntax
public static class TemplateConventions : Object
Methods
GetRenderTemplateModelType(Type)
Gets the model type of the specified render template. This method returns null if IRenderTemplate<TModel> is not implemented. If more than one IRenderTemplate<TModel> is implemented this method will throw an exception.
Declaration
public static Type GetRenderTemplateModelType(Type templateType)
Parameters
Type | Name | Description |
---|---|---|
System. |
templateType |
Returns
Type | Description |
---|---|
System. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown if the type has multiple implementations of IRenderTemplate<TModel>. |
IsRenderTemplate(Type)
Determines whether the type is a render template implementation, i.e. a non abstract or generic type definition that implements the IRender
Declaration
public static bool IsRenderTemplate(Type type)
Parameters
Type | Name | Description |
---|---|---|
System. |
type |
Returns
Type | Description |
---|---|
System. |