Example #1
0
        public void ThrowIfPublishingBroken(ExpertProfile p)
        {
            var check = new ProfileCheckBeforePublish(p);
            var isOk  = p.IsPublished && check.IsReadyForPublish;

            if (!isOk)
            {
                throw new ProfileIsNotPublishedException(check);
            }
        }
Example #2
0
 public ProfileIsNotPublishedException(ProfileCheckBeforePublish profileCheck) : base("Can not publish!")
 {
     this._profileCheck = profileCheck;
 }