private async Task TestCorsRulesAsync(CloudBlobClient client, OperationContext context, IList <CorsRule> corsProps)
        {
            props.Cors.CorsRules.Clear();

            foreach (CorsRule rule in corsProps)
            {
                props.Cors.CorsRules.Add(rule);
            }

            await client.SetServicePropertiesAsync(props, null, context);

            TestHelper.AssertServicePropertiesAreEqual(props, await client.GetServicePropertiesAsync());
        }
        internal static void DisableSoftDelete(this CloudBlobClient client)
        {
            ServiceProperties props = new ServiceProperties(
                deleteRetentionPolicy:
                new DeleteRetentionPolicy()
            {
                Enabled = false
            }
                );

            client.SetServicePropertiesAsync(props).Wait();
#if NETCORE
            Thread.Sleep(30000);
#else
            Task.Delay(TimeSpan.FromSeconds(30)).Wait();
#endif
        }
        internal static void EnableSoftDelete(this CloudBlobClient client)
        {
            ServiceProperties props = new ServiceProperties(
                new LoggingProperties(),
                new MetricsProperties(),
                new MetricsProperties(),
                new CorsProperties(),
                new DeleteRetentionPolicy()
            {
                Enabled       = true,
                RetentionDays = 1
            }
                );

            client.SetServicePropertiesAsync(props).Wait();
#if NETCORE
            Thread.Sleep(30000);
#else
            Task.Delay(TimeSpan.FromSeconds(30)).Wait();
#endif
        }
 public static void MyClassCleanup()
 {
     client.SetServicePropertiesAsync(startProperties).Wait();
 }