Namespace ToSic.Sxc.Code
Classes
DynamicCode
This is a base class for dynamic code which is compiled at runtime.
It delegates all properties like App and methods like AsDynamic() to the parent item which initially caused it to be compiled.
DynamicCode12
New base class for v12 Dynamic Code Adds new properties and methods, and doesn't keep old / legacy APIs
DynamicCodeRoot
Base class for any dynamic code root objects.
Root objects are the ones compiled by 2sxc - like the RazorComponent or ApiController.
If you create code for dynamic compilation, you'll always inherit from ToSic.Sxc.Dnn.DynamicCode.
Note that other DynamicCode objects like RazorComponent or ApiController reference this object for all the interface methods of IDynamicCode.
Interfaces
ICodeLog
A special logger for dynamic code (Razor, WebApi). It is always available to add messages to insights.
ICreateInstance
Marks objects - usually DynamicCode - which can create instances of other C# files.
A special feature is that it must store a reference to the path it's in (provided by the compiler that created this instance).
This is important, so that CreateInstance knows what path to start in.
IDynamicCode
Dynamic code files like Razor or WebApis.
Supports many properties like App, etc. to ensure that the dynamic code has everything you need.
Also provides many Conversions between IEntity and IDynamicEntity.
Important for dynamic code files like Razor or WebApi. Note that there are many overloads to ensure that AsDynamic and AsEntity "just work" even if you give them the original data.
IDynamicCode12
Interface for Dynamic Code with enhancements after v12. It extends IDynamicCode
Dynamic Code is the API for files like Razor or WebApis.
Supports many properties like App, etc. to ensure that the dynamic code has everything you need.
Also provides many Conversions between IEntity and IDynamicEntity.
Important for dynamic code files like Razor or WebApi. Note that there are many overloads to ensure that AsDynamic and AsEntity "just work" even if you give them the original data.
IHasCodeLog
Marks all Razor / WebAPI classes which provide logging functionality