Interface ICodeCustomizer
Helper object to use on Razor, Code, APIs to create more app-specific helper objects.
Like the App
object, View
object etc.
It will usually be provided on a protected Customize
property on RazorTyped etc.
[PublicApi]
public interface ICodeCustomizer
Remarks
New v17.03 (BETA!)
Methods
App<TSettings, TResources>()
Create (and cache for reuse) a strongly typed App instance for the App object.
IAppTyped<TSettings, TResources> App<TSettings, TResources>() where TSettings : class, ITypedItem, ITypedItemWrapper16, new() where TResources : class, ITypedItem, ITypedItemWrapper16, new()
Returns
- IAppTyped<TSettings, TResources>
Type Parameters
TSettings
Type to use for Settings.
TResources
Type to use for Resources
MyHeader<TCustomType>()
Create (and cache for reuse) a strongly typed Header instance for the MyHeader object.
TCustomType MyHeader<TCustomType>() where TCustomType : class, ITypedItem, ITypedItemWrapper16, new()
Returns
- TCustomType
Type Parameters
TCustomType
Type to use for MyHeader.
MyItem<TCustomType>()
Create (and cache for reuse) a strongly typed Item instance for the MyItem object.
TCustomType MyItem<TCustomType>() where TCustomType : class, ITypedItem, ITypedItemWrapper16, new()
Returns
- TCustomType
Type Parameters
TCustomType
Type to use for MyItem.
MyItems<TCustomType>()
Create (and cache for reuse) a strongly typed Items instance for the MyItems object.
IEnumerable<TCustomType> MyItems<TCustomType>() where TCustomType : class, ITypedItem, ITypedItemWrapper16, new()
Returns
- IEnumerable<TCustomType>
Type Parameters
TCustomType
Type to use for MyItems.
MyView<TSettings, TResources>()
Create (and cache for reuse) a strongly typed View instance for the MyView object.
ICmsView<TSettings, TResources> MyView<TSettings, TResources>() where TSettings : class, ITypedItem, ITypedItemWrapper16, new() where TResources : class, ITypedItem, ITypedItemWrapper16, new()
Returns
- ICmsView<TSettings, TResources>
Type Parameters
TSettings
Type to use for Settings.
TResources
Type to use for Resources