private IEnumerator <IAsyncResult> DeleteQueueContainerImpl(string containerName, IContainerCondition conditions, AsyncIteratorContext <NoResults> context) { IStringDataEventStream verboseDebug = Logger <INormalAndDebugLogger> .Instance.VerboseDebug; object[] objArray = new object[] { containerName, this.Timeout }; verboseDebug.Log("DeleteQueueContainerImpl({0},{1})", objArray); IAsyncResult asyncResult = this.StorageManager.AsyncProcessor.BeginExecute((TimeSpan param0) => { using (DevelopmentStorageDbDataContext dbContext = DevelopmentStorageDbDataContext.GetDbContext()) { Microsoft.WindowsAzure.DevelopmentStorage.Store.QueueContainer queueContainer = new Microsoft.WindowsAzure.DevelopmentStorage.Store.QueueContainer() { AccountName = this._account.Name, QueueName = containerName }; queueContainer = DbQueueContainer.LoadQueueContainer(dbContext, queueContainer); DbQueueContainer.CheckQueueContainerCondition(queueContainer, conditions); dbContext.QueueContainers.DeleteOnSubmit(queueContainer); dbContext.SubmitChanges(); } }, this.Timeout, context.GetResumeCallback(), context.GetResumeState("StorageAccount.DeleteBlobContainerImpl")); yield return(asyncResult); this.StorageManager.AsyncProcessor.EndExecute(asyncResult); }
private Microsoft.WindowsAzure.DevelopmentStorage.Store.QueueContainer LoadQueueContainer(DevelopmentStorageDbDataContext context) { return(DbQueueContainer.LoadQueueContainer(context, this._queue)); }