Table of Contents

Interface IAppTyped

Namespace
ToSic.Sxc.Apps
Assembly
ToSic.Sxc.dll

An app-object as is available in a razor template or WebApi when in Typed mode.

[PublicApi]
public interface IAppTyped : IAppIdentity, IZoneIdentity, IAppIdentityLight
Inherited Members

Properties

Configuration

Configuration object with information about the App. This contains things like app version, path etc.

IAppConfiguration Configuration { get; }

Property Value

IAppConfiguration

Data

Data of the app

IAppDataTyped Data { get; }

Property Value

IAppDataTyped

Folder

IFolder Folder { get; }

Property Value

IFolder

Name

App Name

string Name { get; }

Property Value

string

The name as configured in the app configuration.

Resources

All the app resources (usually used for multi-language labels etc.)

ITypedItem Resources { get; }

Property Value

ITypedItem

Settings

All the app settings which are custom for each app.

ITypedItem Settings { get; }

Property Value

ITypedItem

Thumbnail

IFile Thumbnail { get; }

Property Value

IFile

Methods

FolderAdvanced(NoParamOrder, string)

Get the folder of the current app, usually for creating links to assets etc.

IFolder FolderAdvanced(NoParamOrder noParamOrder = default, string location = null)

Parameters

noParamOrder NoParamOrder

see Convention: Named Parameters

location string

name of the app location - either auto (default), site or shared

Returns

IFolder

an IFolder object which can then use .Url, .PhysicalPath etc.

Remarks

  • Despite being of type IFolder, the object is currently not able to traverse children folders/files. We may add this some day in future.
  • Previously the Folder property returned containing the name. This is now on .Folder().Name.

GetQuery(string, NoParamOrder, IDataSourceLinkable, object)

Get a query in this App, optionally with more parameters and sources.

IDataSource GetQuery(string name = null, NoParamOrder noParamOrder = default, IDataSourceLinkable attach = null, object parameters = null)

Parameters

name string
noParamOrder NoParamOrder
attach IDataSourceLinkable
parameters object

Returns

IDataSource