Ejemplo n.º 1
0
        public Question(Guid id, Guid checkListId, string content, string introduction, string image, string video, QuestionType questionType, bool sequence, bool shuffleAnswers, bool required, Guid linksTo)
        {
            if (id == default(Guid))
            {
                throw Error.Argument(string.Format("{0} can't be default guid.", nameof(id)));
            }

            if (string.IsNullOrEmpty(content))
            {
                throw Error.ArgumentNull(string.Format("{0} can't be empty.", nameof(content)));
            }

            Id             = id;
            ChecklistId    = checkListId;
            Content        = content;
            Introduction   = introduction;
            Image          = image;
            Video          = video;
            Type           = questionType;
            Sequence       = sequence;
            ShuffleAnswers = shuffleAnswers;
            Required       = required;
            LinksTo        = linksTo;
        }
Ejemplo n.º 2
0
 public QuestionBuilder WithQuestionType(QuestionType value)
 {
     _questionType = value;
     return(this);
 }