Table of Contents

Interface IContentQueryDataContainer

Namespace
CMS.ContentEngine
Assembly
CMS.ContentEngine.dll

Content query data container interface.

public interface IContentQueryDataContainer
Extension Methods

Remarks

Interface is not meant to be implemented by custom classes.

Properties

ContentItemCommonDataContentLanguageID

Gets content item language ID from content query data container.

int ContentItemCommonDataContentLanguageID { get; }

Property Value

int
See Also

ContentItemCommonDataFirstPublishedWhen

Gets content item first published when from content query data container.

DateTime? ContentItemCommonDataFirstPublishedWhen { get; }

Property Value

DateTime?
See Also

ContentItemCommonDataLastPublishedWhen

Gets content item last published when from content query data container.

DateTime? ContentItemCommonDataLastPublishedWhen { get; }

Property Value

DateTime?
See Also

ContentItemCommonDataVersionStatus

Gets content item version status from content query data container.

VersionStatus ContentItemCommonDataVersionStatus { get; }

Property Value

VersionStatus
See Also

ContentItemContentTypeID

Gets content type ID from content query data container.

int ContentItemContentTypeID { get; }

Property Value

int
See Also

ContentItemGUID

Gets content item GUID from content query data container.

Guid ContentItemGUID { get; }

Property Value

Guid
See Also

ContentItemID

Gets the content item ID value from content query data container.

int ContentItemID { get; }

Property Value

int
See Also

ContentItemIsSecured

Gets the value that indicates whether content item is secured from content query data container.

bool ContentItemIsSecured { get; }

Property Value

bool
See Also

ContentItemName

Gets content item name from content query data container.

string ContentItemName { get; }

Property Value

string
See Also

ContentTypeName

Gets the content item type name.

string ContentTypeName { get; }

Property Value

string

Methods

GetLinkedItems(string)

Gets linked content items referenced in the referenceFieldName that were included to the query.

IEnumerable<IContentQueryDataContainer> GetLinkedItems(string referenceFieldName)

Parameters

referenceFieldName string

Name of the field whose referenced items to get.

Returns

IEnumerable<IContentQueryDataContainer>

Returns an enumeration of linked content items referenced from referenceFieldName.

Exceptions

ArgumentException

Thrown when referenceFieldName is null or empty or when the referenced items for the specified field were not included to the query.

GetValue<TValue>(string)

Gets value from content query data container.

TValue GetValue<TValue>(string columnName)

Parameters

columnName string

Column name of the stored value.

Returns

TValue

Type Parameters

TValue

Exceptions

ArgumentNullException

Thrown if columnName is null.

InvalidCastException

Thrown if type of value stored in data cannot be cast to the passed generic type.

See Also

TryGetLinkedItems(string, out IEnumerable<IContentQueryDataContainer>)

Tries to get linked content items referenced in the referenceFieldName that were included to the query.

bool TryGetLinkedItems(string referenceFieldName, out IEnumerable<IContentQueryDataContainer> linkedItems)

Parameters

referenceFieldName string

Name of the field whose referenced items to get.

linkedItems IEnumerable<IContentQueryDataContainer>

An enumeration of linked content items referenced from referenceFieldName.

Returns

bool

Returns true if the items for the referenceFieldName were retrieved.

Exceptions

ArgumentException

Thrown when referenceFieldName is null or empty or when the referenced items for the specified field were not included to the query.

TryGetValue<TValue>(string, out TValue)

Tries to retrieve value from content query data container.

bool TryGetValue<TValue>(string columnName, out TValue value)

Parameters

columnName string

Column name of the stored value.

value TValue

Retrieved value.

Returns

bool

True if the value was retrieved.

Type Parameters

TValue

Exceptions

ArgumentNullException

Thrown if columnName is null.

InvalidCastException

Thrown if type of value stored in data cannot be cast to the passed generic type.

See Also