BaseAssetCollection.CreateAsync Method (String[], String, AssetCreationOptions, CancellationToken)
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Asynchronously creates an asset containing the provided files.
Namespace: Microsoft.WindowsAzure.MediaServices.Client
Assembly: Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)
Usage
'Usage
Syntax
'Declaration
Parameters
- files
The files that make up an asset.
- primaryFile
The name of the file to be used as the primary file when creating the asset.
- options
A AssetCreationOptions value that specifies how to create an asset.
- cancellationToken
A CancellationToken to cancel CreateAsync operation.
Return Value
An Task of type IAsset, where IAsset representing the provided representing the provided files created according to the specified creation options.
Exceptions
| Exception type | Condition |
|---|---|
| ArgumentNullException | files |
| ArgumentException | files |
| ArgumentException | files |
| ArgumentException | The file name of a file in the asset is not unique. The file path is not used to make this determination, only file names are compared. |
| FileNotFoundException | primaryFilefiles |
Remarks
By default, Media Services encrypts assets and their included files for transfer and storage. For information on encryption options and creating assets, see Ingest Assets with the Media Services SDK for .NET.
The default upload access duration is 12 hours.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows 7, Windows Server 2008, Windows 8 Beta
Target Platforms
See Also
Reference
BaseAssetCollection Class
BaseAssetCollection Members
Microsoft.WindowsAzure.MediaServices.Client Namespace
Build Date:
2012-06-07