예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SurveyForm" /> class.
        /// </summary>



        /// <param name="Name">The survey form name (required).</param>



        /// <param name="Disabled">Is this form disabled.</param>



        /// <param name="HeaderImageId">Id of the header image appearing at the top of the form..</param>



        /// <param name="Header">Markdown text for the top of the form..</param>



        /// <param name="Footer">Markdown text for the bottom of the form..</param>



        /// <param name="QuestionGroups">A list of question groups (required).</param>



        /// <param name="PublishedVersions">List of published version of this form.</param>



        public SurveyForm(string Name = null, bool?Disabled = null, string HeaderImageId = null, string Header = null, string Footer = null, List <QuestionGroup> QuestionGroups = null, DomainEntityListingSurveyForm PublishedVersions = null)
        {
            // to ensure "Name" is required (not null)
            if (Name == null)
            {
                throw new InvalidDataException("Name is a required property for SurveyForm and cannot be null");
            }
            else
            {
                this.Name = Name;
            }



            // to ensure "QuestionGroups" is required (not null)
            if (QuestionGroups == null)
            {
                throw new InvalidDataException("QuestionGroups is a required property for SurveyForm and cannot be null");
            }
            else
            {
                this.QuestionGroups = QuestionGroups;
            }



            this.Disabled = Disabled;



            this.HeaderImageId = HeaderImageId;



            this.Header = Header;



            this.Footer = Footer;



            this.PublishedVersions = PublishedVersions;
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SurveyForm" /> class.
 /// </summary>
 /// <param name="Name">The survey form name (required).</param>
 /// <param name="Disabled">Is this form disabled.</param>
 /// <param name="Language">Language for survey viewer localization. Currently localized languages: da, de, en-US, es, fi, fr, it, ja, ko, nl, no, pl, pt-BR, sv, th, tr, zh-CH, zh-TW (required).</param>
 /// <param name="HeaderImageId">Id of the header image appearing at the top of the form..</param>
 /// <param name="Header">Markdown text for the top of the form..</param>
 /// <param name="Footer">Markdown text for the bottom of the form..</param>
 /// <param name="QuestionGroups">A list of question groups (required).</param>
 /// <param name="PublishedVersions">List of published version of this form.</param>
 public SurveyForm(string Name = null, bool?Disabled = null, string Language = null, string HeaderImageId = null, string Header = null, string Footer = null, List <SurveyQuestionGroup> QuestionGroups = null, DomainEntityListingSurveyForm PublishedVersions = null)
 {
     this.Name              = Name;
     this.Disabled          = Disabled;
     this.Language          = Language;
     this.HeaderImageId     = HeaderImageId;
     this.Header            = Header;
     this.Footer            = Footer;
     this.QuestionGroups    = QuestionGroups;
     this.PublishedVersions = PublishedVersions;
 }