AppService.GetContent Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Overloads

GetContent(int, int?, bool, bool) Get content items in the specified App .
GetContent(int, int?, bool, bool) Get content items of type T from the specified app.

GetContent(int, int?, bool, bool)

Get content items in the specified App .

public static IEnumerable<Content> GetContent(int id, int? depth, bool sudo = false, bool trashed = false)

Parameters

id
int

Id of the App for which to get content.

depth
int?

The maximum depth of descendants to return, e.g. setting depth to 1 returns only the immediate children. When depth is null, the entire content hierarchy of the app is returned.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return trashed items, otherwise false.

Returns

System.Collections.Generic.IEnumerable

Returns a list of Content objects.

GetContent(int, int?, bool, bool)

Get content items of type T from the specified app.

public static IEnumerable<T> GetContent<T>(int id, int? depth, bool sudo = false, bool trashed = false)
    where T : Content

Parameters

id
int

Id of the app item for which to get content.

depth
int?

The maximum depth of descendants to return, e.g. setting depth to 1 returns only the immediate children. If depth is null, all descendants are returned.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return trashed items, otherwise false.

Returns

System.Collections.Generic.IEnumerable<>

Returns a list of Content objects of type T.