public async Task <FileMetadata> SaveSourceFileStreamAsync(Stream stream, string contentType) { ConfigurationOptions options = await _configuration.GetApplicationConfigurationAsync(); return(await saveFileStreamAsync( stream, contentType, options.SourceBlobContainerName, options.StorageConnectionString)); }
public async Task SaveTaskAsync(ProcessingTask task) { if (null == task) { throw new ArgumentNullException("task"); } ConfigurationOptions options = await _configuration.GetApplicationConfigurationAsync(); CloudTable table = await getTableReferenceAsync(options); TableOperation operation = TableOperation.InsertOrReplace(new ProcessingTaskEntity(task)); await table.ExecuteAsync(operation); }
public async Task <ProcessingTaskQueueMessage> EnqueueConversionTaskAsync(ProcessingTask task) { ConfigurationOptions options = await _configuration.GetApplicationConfigurationAsync(); CloudQueue queue = await getQueueReferenceAsync(options); string message = JsonConvert.SerializeObject(task); var msg = new CloudQueueMessage(message); await queue.AddMessageAsync(msg); return(new ProcessingTaskQueueMessage { Id = null, PopReceipt = null, Task = task }); }