IAssetFolderDescendantAssetsWithMaxDepth Method
|
Retrieves the descendant assets of the context asset folder within the given depth limit.
Namespace:
Ingeniux.CMS
Assembly:
Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax IEnumerable<IAsset> DescendantAssetsWithMaxDepth(
out int count,
int maxDepth,
int pageSize = -1,
int startIndex = -1
)
Function DescendantAssetsWithMaxDepth (
<OutAttribute> ByRef count As Integer,
maxDepth As Integer,
Optional pageSize As Integer = -1,
Optional startIndex As Integer = -1
) As IEnumerable(Of IAsset)
IEnumerable<IAsset^>^ DescendantAssetsWithMaxDepth(
[OutAttribute] int% count,
int maxDepth,
int pageSize = -1,
int startIndex = -1
)
abstract DescendantAssetsWithMaxDepth :
count : int byref *
maxDepth : int *
?pageSize : int *
?startIndex : int
(* Defaults:
let _pageSize = defaultArg pageSize -1
let _startIndex = defaultArg startIndex -1
*)
-> IEnumerable<IAsset>
Parameters
- count
- Type: SystemInt32
Total count of all descendant assets. - maxDepth
- Type: SystemInt32
The depth limit of descendants, relative of this asset folder's hierarchy level.
Examples A maxDepth value of 2 means to retrieve the descendants that are within 2 levels below the given asset folder.
Remarks A maxDepth of 0 means to retrieve all descendants.
- pageSize (Optional)
- Type: SystemInt32
Number of entries to return. If not provided, returns all entries. - startIndex (Optional)
- Type: SystemInt32
Starting index of entries. If not provided, starts from the first entry.
Return Value
Type:
IEnumerableIAssetCollection of descendant assets within the depth limit.
Examples
Example of DescendantAssetsWithMaxDepth method in custom hook:
int outVar;
foreach(IAsset asset in session.Site.AssetFolder("af/5").DescendantAssetsWithMaxDepth(out outVar, 2)){
}
See Also