AWSSDK.Tests.Framework.MissingAPILambdaFunctions.DeleteBucket C# (CSharp) Method

DeleteBucket() public static method

public static DeleteBucket ( string bucketName, RegionEndpoint region ) : void
bucketName string
region Amazon.RegionEndpoint
return void
        public static void DeleteBucket(string bucketName, RegionEndpoint region)
        {
            AutoResetEvent ars = new AutoResetEvent(false);
            Exception responseException = new Exception();
            string functionError = null;
            string payload = string.Format(@"{{""BucketName"":""{0}"",""Region"":""{1}""}}", bucketName, region.SystemName);
            LambdaClient.InvokeAsync(new InvokeRequest()
            {
                FunctionName = DeleteBucketFunctionName,
                InvocationType = InvocationType.RequestResponse,
                Payload = payload
            }, (response) =>
            {
                responseException = response.Exception;
                if (responseException == null)
                {
                    functionError = response.Response.FunctionError;
                }
                ars.Set();
            }, new AsyncOptions { ExecuteCallbackOnMainThread = false });
            ars.WaitOne();
            if (responseException != null)
            {
                throw responseException;
            }
            Utils.AssertStringIsNullOrEmpty(functionError);
        }