public void ResumeOwnerProcessing(AsyncQueueOwnerInfo owner) { if (owner == null) { throw new ArgumentNullException("owner"); } if (this.GetPausedOwners().FirstOrDefault((AsyncQueueOwnerInfo o) => string.Equals(o.OwnerId, owner.OwnerId, StringComparison.CurrentCultureIgnoreCase)) == null) { throw new InvalidOperationException(string.Format("The owner '{0}' is not paused.", owner.OwnerId)); } this.dataProviderDirectory.Delete(owner); }
public void PauseOwnerProcessing(AsyncQueueOwnerInfo owner) { if (owner == null || string.IsNullOrWhiteSpace(owner.OwnerId)) { throw new ArgumentNullException("owner"); } AsyncQueueOwnerInfo asyncQueueOwnerInfo = this.GetPausedOwners().FirstOrDefault((AsyncQueueOwnerInfo o) => string.Equals(o.OwnerId, owner.OwnerId, StringComparison.CurrentCultureIgnoreCase)); if (asyncQueueOwnerInfo != null) { throw new InvalidOperationException(string.Format("The owner '{0}' is in already paused.", owner.OwnerId)); } this.dataProviderDirectory.Save(owner); }