Microsoft.WindowsAzure.MediaServices.Client.AssetCollection.CreateAsync C# (CSharp) Method

CreateAsync() public method

Asynchronously creates an asset that does not contain any files and AssetState is Initialized.
public CreateAsync ( string assetName, AssetCreationOptions options, CancellationToken cancellationToken ) : Task
assetName string The asset name.
options AssetCreationOptions A which will be associated with created asset.
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task
        public override Task<IAsset> CreateAsync(string assetName, AssetCreationOptions options, CancellationToken cancellationToken)
        {
            IStorageAccount defaultStorageAccount = this.MediaContext.DefaultStorageAccount;
            if (defaultStorageAccount == null)
            {
                throw new InvalidOperationException(StringTable.DefaultStorageAccountIsNull);
            }
            return this.CreateAsync(assetName, defaultStorageAccount.Name, options, cancellationToken);
        }

Same methods

AssetCollection::CreateAsync ( string assetName, string storageAccountName, AssetCreationOptions options, CancellationToken cancellationToken ) : Task