Table of Contents
These v19 docs are archived 🔒. Go to the latest docs home or try if this exact page is available in the latest docs.

Interface ICodeCustomizer

Namespace
ToSic.Sxc.Code
Assembly
ToSic.Sxc.dll

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, ICanWrapData, new() where TResources : class, ICanWrapData, 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, ICanWrapData, 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, ICanWrapData, 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, ICanWrapData, 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, ICanWrapData, new() where TResources : class, ICanWrapData, new()

Returns

ICmsView<TSettings, TResources>

Type Parameters

TSettings

Type to use for Settings.

TResources

Type to use for Resources