AssetBaseCollection.CreateAsync Method (String, AssetCreationOptions, CancellationToken)
Asynchronously creates an asset that does not contain any files and AssetState is initialized.
Namespace: Microsoft.WindowsAzure.MediaServices.Client
Assembly: Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)
Syntax
'Declaration
Public MustOverride Function CreateAsync ( _
assetName As String, _
options As AssetCreationOptions, _
cancellationToken As CancellationToken _
) As Task(Of IAsset)
'Usage
Dim instance As AssetBaseCollection
Dim assetName As String
Dim options As AssetCreationOptions
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of IAsset)
returnValue = instance.CreateAsync(assetName, _
options, cancellationToken)
public abstract Task<IAsset> CreateAsync(
string assetName,
AssetCreationOptions options,
CancellationToken cancellationToken
)
public:
virtual Task<IAsset^>^ CreateAsync(
String^ assetName,
AssetCreationOptions options,
CancellationToken cancellationToken
) abstract
abstract CreateAsync :
assetName:string *
options:AssetCreationOptions *
cancellationToken:CancellationToken -> Task<IAsset>
public abstract function CreateAsync(
assetName : String,
options : AssetCreationOptions,
cancellationToken : CancellationToken
) : Task<IAsset>
Parameters
- assetName
Type: System.String
The asset name.
- options
Type: Microsoft.WindowsAzure.MediaServices.Client.AssetCreationOptions
A AssetCreationOptions which will be associated with created asset.
- cancellationToken
Type: System.Threading.CancellationToken
The cancellation token.
Return Value
Type: System.Threading.Tasks.Task<IAsset>
An Task of type IAsset, where IAsset created according to the specified creation options.