public void ThrowIfPublishingBroken(Event e) { var check = new EventCheckBeforePublish(e); var isOk = e.IsPublished && check.IsReadyForPublish; if (!isOk) { throw new EventIsNotPublishedException(check); } }
public EventIsNotPublishedException(EventCheckBeforePublish eventCheck) : base("Can not publish!") { this._eventCheck = eventCheck; }