IAssetFolderAssets Method
|
Retrieves a collection of the assets inside of the folder.
Namespace: Ingeniux.CMSAssembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
SyntaxIEnumerable<IAsset> Assets(
out int count,
int pageSize = -1,
int startIndex = -1
)
Function Assets (
<OutAttribute> ByRef count As Integer,
Optional pageSize As Integer = -1,
Optional startIndex As Integer = -1
) As IEnumerable(Of IAsset)
IEnumerable<IAsset^>^ Assets(
[OutAttribute] int% count,
int pageSize = -1,
int startIndex = -1
)
abstract Assets :
count : int byref *
?pageSize : int *
?startIndex : int
(* Defaults:
let _pageSize = defaultArg pageSize -1
let _startIndex = defaultArg startIndex -1
*)
-> IEnumerable<IAsset> Parameters
- count Int32
- Total count of all child assets.
- pageSize Int32 (Optional)
- Number of entries to return. If not provided, returns all entries.
- startIndex Int32 (Optional)
- Starting index of entries. If not provided, starts from the first entry.
Return Value
IEnumerableIAssetCollection of child assets.
Example
Example of removing all assets in a folder in a custom hook:
var assetFolder = session.Site.AssetFolder("af/114");
int c;
foreach (var child in assetFolder.Assets(out c))
{
assetFolder.RemoveAsset(child);
}
See Also