Table of Contents

Namespace ToSic.Sxc.Code



A special logger for dynamic code (Razor, WebApi). It is always available to add messages to insights.



This should provide special APIs to assist developers. It will probably change from version to version, so the use should be limited to quick debugs and similar, but never remain in the code.


Special interface to mark all objects which have the current code context. These objects know about the current App, are able to provide ServiceKits and more.

The interface is used to allow for code in the AppCode folder to pass the context to the base class. Thereby enabling things such as the Kit or App object to magically work.


Object in partial Razor files to access parameters handed in. Example caller:

@Html.Partial(someFile, new { blogPost, file = mainFile, title = "hello" }

Example partial:

var blogPost = MyModel.Item("BlogPost");
var file = MyModel.File("File");
var title = MyModel.String("Title");

The common data types such as string or ITypedItem have methods to quickly get them in the desired type. This allows things such as var message = MyModel.String("Message"); For less common types you'll need to use Get(string, NoParamOrder, bool?) and cast it as needed, like this: string message = MyModel.Get("Message");.