AssetBaseCollection.CreateAsync Method (String, 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, _
storageAccountName As String, _
options As AssetCreationOptions, _
cancellationToken As CancellationToken _
) As Task(Of IAsset)
'Usage
Dim instance As AssetBaseCollection
Dim assetName As String
Dim storageAccountName As String
Dim options As AssetCreationOptions
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of IAsset)
returnValue = instance.CreateAsync(assetName, _
storageAccountName, options, cancellationToken)
public abstract Task<IAsset> CreateAsync(
string assetName,
string storageAccountName,
AssetCreationOptions options,
CancellationToken cancellationToken
)
public:
virtual Task<IAsset^>^ CreateAsync(
String^ assetName,
String^ storageAccountName,
AssetCreationOptions options,
CancellationToken cancellationToken
) abstract
abstract CreateAsync :
assetName:string *
storageAccountName:string *
options:AssetCreationOptions *
cancellationToken:CancellationToken -> Task<IAsset>
public abstract function CreateAsync(
assetName : String,
storageAccountName : String,
options : AssetCreationOptions,
cancellationToken : CancellationToken
) : Task<IAsset>
Parameters
- assetName
Type: System.String
The asset name.
- storageAccountName
Type: System.String
The storage account 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>
Returns Task<TResult>.