コード例 #1
0
        private async Task DeleteTaskHub(string taskHub, string connectionString)
        {
            var settings = new AzureStorageOrchestrationServiceSettings()
            {
                TaskHubName             = taskHub,
                StorageConnectionString = connectionString,
            };

            var service = new AzureStorageOrchestrationService(settings);
            await service.StartAsync();

            this.output.WriteLine($"Deleting task hub : {taskHub}");
            try
            {
                await service.DeleteAsync();
            }
            catch (Exception ex)
            {
                // Log error, but don't fail the test, as it can be cleaned up later.
                this.output.WriteLine($"Encountered exception deleting task hub: : {ex.ToString()}");
            }
        }