C# Класс Sitecore.SharedSource.Commons.Extensions.CustomItemExtensions

custom extension methods
Показать файл Открыть проект

Открытые методы

Метод Описание
GetAncestor ( this item, List templateIds ) : Item

Crawls up the tree until one of the passed templates are found and return that item.

GetAncestor ( this item, List templateIds, bool deepInheritance ) : Item

Crawls up the tree until one of the passed templates are found and return that item. This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value

GetAncestor ( this item, List templateIds, int inheritanceDepth ) : Item

Crawls up the tree until one of the passed templates are found and return that item.

GetAncestor ( this item, string templateId ) : Item

Crawls up the tree until the template is found

GetAncestor ( this item, string templateId, bool deepInheritance ) : Item

Crawls up the tree until the template is found This signature may result in a performance hit. // TODO, paste around If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value

GetAncestor ( this item, string templateId, int inheritanceDepth ) : Item

Crawls up the tree until the template is found

IsNotNull ( this item ) : bool

Checks to see if an item is not null

IsNull ( this item ) : bool

Checks to see if an item is null

IsOfTemplate ( this item, string templateId ) : bool

check to verify that the item is of passed template

IsOfTemplate ( this item, string templateId, bool deep ) : bool

Will check the item's template, if deep is enabled it will check item's base templates This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value

IsOfTemplate ( this item, string templateId, int depth ) : bool

Will check the item's template, if depth is non-zero it will recurse down the item's base templates

Описание методов

GetAncestor() публичный статический Метод

Crawls up the tree until one of the passed templates are found and return that item.
public static GetAncestor ( this item, List templateIds ) : Item
item this
templateIds List
Результат Item

GetAncestor() публичный статический Метод

Crawls up the tree until one of the passed templates are found and return that item. This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value
public static GetAncestor ( this item, List templateIds, bool deepInheritance ) : Item
item this
templateIds List
deepInheritance bool
Результат Item

GetAncestor() публичный статический Метод

Crawls up the tree until one of the passed templates are found and return that item.
public static GetAncestor ( this item, List templateIds, int inheritanceDepth ) : Item
item this
templateIds List
inheritanceDepth int
Результат Item

GetAncestor() публичный статический Метод

Crawls up the tree until the template is found
public static GetAncestor ( this item, string templateId ) : Item
item this
templateId string
Результат Item

GetAncestor() публичный статический Метод

Crawls up the tree until the template is found This signature may result in a performance hit. // TODO, paste around If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value
public static GetAncestor ( this item, string templateId, bool deepInheritance ) : Item
item this
templateId string
deepInheritance bool
Результат Item

GetAncestor() публичный статический Метод

Crawls up the tree until the template is found
public static GetAncestor ( this item, string templateId, int inheritanceDepth ) : Item
item this
templateId string
inheritanceDepth int 0 = 'Do not recurse', -1 = 'recurse as far as system base template', n = 'recurse n times'
Результат Item

IsNotNull() публичный статический Метод

Checks to see if an item is not null
public static IsNotNull ( this item ) : bool
item this
Результат bool

IsNull() публичный статический Метод

Checks to see if an item is null
public static IsNull ( this item ) : bool
item this
Результат bool

IsOfTemplate() публичный статический Метод

check to verify that the item is of passed template
public static IsOfTemplate ( this item, string templateId ) : bool
item this
templateId string
Результат bool

IsOfTemplate() публичный статический Метод

Will check the item's template, if deep is enabled it will check item's base templates This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value
public static IsOfTemplate ( this item, string templateId, bool deep ) : bool
item this
templateId string
deep bool
Результат bool

IsOfTemplate() публичный статический Метод

Will check the item's template, if depth is non-zero it will recurse down the item's base templates
public static IsOfTemplate ( this item, string templateId, int depth ) : bool
item this
templateId string
depth int 0 = 'Do not recurse', -1 = 'recurse as far as system base template', n = 'recurse n times'
Результат bool