protected override IEnumerator <IAsyncResult> ClearQueueImpl(IAccountIdentifier identity, string account, string queue, TimeSpan?timeout, RequestContext requestContext, AsyncIteratorContext <NoResults> context) { RemainingTime remainingTime = new RemainingTime(timeout); SASAuthorizationParameters sASAuthorizationParameter = new SASAuthorizationParameters() { SupportedSasTypes = SasType.AccountSas, SignedResourceType = SasResourceType.Object, SignedPermission = SASPermission.Delete }; SASAuthorizationParameters sASAuthorizationParameter1 = sASAuthorizationParameter; IAsyncResult asyncResult = this.BeginGetQueue(identity, account, queue, PermissionLevel.Delete, sASAuthorizationParameter1, remainingTime, requestContext, context.GetResumeCallback(), context.GetResumeState("QueueManager.ClearQueueImpl")); yield return(asyncResult); IQueueContainer operationStatus = this.EndGetQueue(asyncResult); if (requestContext != null) { operationStatus.OperationStatus = requestContext.OperationStatus; } operationStatus.Timeout = remainingTime; asyncResult = operationStatus.BeginClearQueue(context.GetResumeCallback(), context.GetResumeState("QueueManager.ClearQueueImpl")); yield return(asyncResult); operationStatus.EndClearQueue(asyncResult); }