private static void DeleteAllAccountAndGroupContents(bool useWorker) { var accountIDs = TBRAccountRoot.GetAllAccountIDs(); var groupIDs = TBRGroupRoot.GetAllGroupIDs(); List <string> referenceLocations = new List <string>(); foreach (var accountID in accountIDs) { string referenceLocation = "acc/" + accountID + "/"; referenceLocations.Add(referenceLocation); } foreach (var groupID in groupIDs) { string referenceLocation = "grp/" + groupID + "/"; referenceLocations.Add(referenceLocation); } if (useWorker) { referenceLocations.ForEach(refLoc => { VirtualOwner owner = VirtualOwner.FigureOwner(refLoc); QueueSupport.PutToOperationQueue( new OperationRequest { DeleteOwnerContent = new DeleteOwnerContentOperation { ContainerName = owner.ContainerName, LocationPrefix = owner.LocationPrefix } } ); }); } else { referenceLocations.ForEach(refLoc => StorageSupport.DeleteContentsFromOwner(refLoc)); } }
private static void DeleteOwnerContent(VirtualOwner containerOwner) { StorageSupport.DeleteContentsFromOwner(containerOwner); }