コード例 #1
0
        public void SetRelief(Relief relief)
        {
            if (relief != null && relief.UserId != UserId)
            {
                throw new ArgumentException("Alívio precisa pertencer ao mesmo usuário que episódio");
            }

            ReliefId = relief?.Id;
            Relief   = relief;
        }
コード例 #2
0
        public Episode(User user, DateTime start, DateTime?end, int intensity, bool releafWorked, Local local = null, Cause cause = null, Relief relief = null)
        {
            SetUser(user);
            SetStart(start);
            SetEnd(end);
            SetIntensity(intensity);

            ReleafWorked = releafWorked;

            SetLocal(local);
            SetCause(cause);
            SetRelief(relief);
        }