Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="InputQRCode" /> class.
        /// </summary>
        /// <param name="input">Text value(s) (vertical bar delimited by type) (required).</param>
        /// <param name="payload">Payload type (required) (default to PayloadEnum.PlainTextstring).</param>
        public InputQRCode(string input = default(string), PayloadEnum payload = PayloadEnum.PlainTextstring)
        {
            // to ensure "input" is required (not null)
            if (input == null)
            {
                throw new InvalidDataException("input is a required property for InputQRCode and cannot be null");
            }
            else
            {
                this.Input = input;
            }

            // to ensure "payload" is required (not null)
            if (payload == null)
            {
                throw new InvalidDataException("payload is a required property for InputQRCode and cannot be null");
            }
            else
            {
                this.Payload = payload;
            }
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InputQRCode" /> class.
 /// </summary>
 /// <param name="input">Text value(s) (vertical bar delimited by type) (required).</param>
 /// <param name="payload">Payload type (required) (default to PayloadEnum.PlainTextstring).</param>
 public InputQRCode(string input = default(string), PayloadEnum payload = PayloadEnum.PlainTextstring)
 {
     // to ensure "input" is required (not null)
     this.Input   = input ?? throw new ArgumentNullException("input is a required property for InputQRCode and cannot be null");
     this.Payload = payload;
 }