ContentService.Get Method

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

Overloads

Get(int, bool, bool) Get the (latest version) of the specified Content item.
Get(int, long, bool, bool) Get the specified Content version.
Get(int, bool, bool) Get the (latest version) of the specified Content item.
Get(int, long, bool, bool) Get the specified Content version.

Get(int, bool, bool)

Get the (latest version) of the specified Content item.

public static Content Get(int id, bool sudo = false, bool trashed = false)

Parameters

id
int
sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return content even if trashed, otherwise false.

Returns

Content

A Content object.

Get(int, long, bool, bool)

Get the specified Content version.

public static Content Get(int id, long version, bool sudo = false, bool trashed = false)

Parameters

id
int

Id of the content item.

version
long

Timestamp of the version to return.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return content even if trashed, otherwise false.

Returns

Content

An object implementing the Content interface.

Get(int, bool, bool)

Get the (latest version) of the specified Content item.

public static T Get<T>(int id, bool sudo = false, bool trashed = false)
    where T : Content

Parameters

id
int

Id of the content item.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return content even if trashed, otherwise false.

Returns

An object of type T.

Get(int, long, bool, bool)

Get the specified Content version.

public static T Get<T>(int id, long version, bool sudo = false, bool trashed = false)
    where T : Content, IVersionable

Parameters

id
int

Id of the content item.

version
long

Timestamp of the version to return.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return content even if trashed, otherwise false.

Returns

An object of type T.