System.IO.TextWriter.WriteLineAsync C# (CSharp) Method

WriteLineAsync() public method

public WriteLineAsync ( ) : Task
return Task
        public virtual Task WriteLineAsync()
        {
            return WriteAsync(CoreNewLine);
        }

Same methods

TextWriter::WriteLineAsync ( char value ) : Task
TextWriter::WriteLineAsync ( char buffer, int index, int count ) : Task
TextWriter::WriteLineAsync ( string value ) : Task

Usage Example

Exemplo n.º 1
0
        internal static async Task ReplicateBlobAsync(PhotoModel model, TextWriter log)
        {
            //The source connection string needs to be in AppSettings using the
            //storage account name.
            var sourceConnectionString = ConfigurationManager.AppSettings[model.StorageAccountName];

            //The target connection string is the local region's storage account
            var targetConnectionString = SettingsHelper.LocalStorageConnectionString;

            //Copy from the upload container to the photos container,
            //    potentially across storage accounts
            await log.WriteLineAsync("sourceConnectionString: " + sourceConnectionString);
            await log.WriteLineAsync("targetConnectionString: " + targetConnectionString);

            var storageRepo = new StorageRepository(sourceConnectionString);
            var container = await storageRepo.ReplicateBlobAsync(
                targetConnectionString,
                StorageConfig.UserUploadBlobContainerName,
                StorageConfig.PhotosBlobContainerName,
                model.ServerFileName, log);

            //Monitor the copy operation and wait for it to finish
            //before proceeding
            await storageRepo.MonitorCopy(container, model.ServerFileName, log);
        }
All Usage Examples Of System.IO.TextWriter::WriteLineAsync