Table of Contents

Class ServiceKit14

Namespace
ToSic.Sxc.Services
Assembly
ToSic.Sxc.dll

Default ServiceKit for 2sxc v14.

This is the recommended Kit of services. for base classes of 2sxc 14.

This means that the object has many properties such as Page, which will generate the corresponding service like IPageService to quickly use common services.

To use them in Razor, you'll do things like:

@Kit.Page.Activate("fancybox3")
[PublicApi]
public class ServiceKit14 : ServiceKit, IHasLog, ICanDebug
Inheritance
object
ServiceBase
ServiceForDynamicCode
ServiceKit
ServiceKit14
Implements

Remarks

  • History: Added v14.04

Properties

Adam

The ADAM Service, used to retrieve files and maybe more.

public IAdamService Adam { get; }

Property Value

IAdamService

Convert

The Convert Service, used to convert any kind of data type to another data type

public IConvertService Convert { get; }

Property Value

IConvertService

Css

The Koi CSS Service, used to detect the current CSS framework and other features. See ICss

public ICss Css { get; }

Property Value

ICss

Data

The Data service to get DataSources and similar.

public IDataService Data { get; }

Property Value

IDataService

Remarks

  • added in v15.06

Edit

The Edit service, same as the main Edit service

public IEditService Edit { get; }

Property Value

IEditService

Feature

The Features service, used to check if features are enabled

public IFeaturesService Feature { get; }

Property Value

IFeaturesService

HtmlTags

The Razor Blade 4 HtmlTags service, to fluidly create Tags. See .

Important

This is similar but different to the Razor.Blade.Tag. The Razor Blade IHtmlTag objects returned here are immutable. This means that chained commands like ...HtmlTags.Div().Id(...).Class(...) all return new objects and don't modify the previous one.

The older Tag helper created mutable objects where chaining always modified the original and returned it again.

public IHtmlTagsService HtmlTags { get; }

Property Value

IHtmlTagsService

Remarks

Added in v15

Image

The Images service, used to create img and picture tags

public IImageService Image { get; }

Property Value

IImageService

Json

The JSON service, used to convert data to-and-from JSON

public IJsonService Json { get; }

Property Value

IJsonService

Link helper object to create the correct links

public ILinkService Link { get; }

Property Value

ILinkService

A ILinkService object.

Mail

The Mail service, used to send mails

public IMailService Mail { get; }

Property Value

IMailService

Page

The Page service, used to set headers, activate features etc.

public IPageService Page { get; }

Property Value

IPageService

Render

The Render service, used to render one or more dynamic content within other content

public IRenderService Render { get; }

Property Value

IRenderService

Scrub

The Razor-Blade Scrub service, used to clean up HTML. See Razor Blade IScrub Service

public IScrub Scrub { get; }

Property Value

IScrub

SecureData

The Secure Data service - mainly for reading / decrypting secrets.

public ISecureDataService SecureData { get; }

Property Value

ISecureDataService

SystemLog

The System Log service, used to add log messages to the system (Dnn/Oqtane)

public ISystemLogService SystemLog { get; }

Property Value

ISystemLogService

Toolbar

The toolbar service, used to generate advanced toolbars

public IToolbarService Toolbar { get; }

Property Value

IToolbarService