Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TeamEventStatusAlliance" /> class.
 /// </summary>
 /// <param name="name">Alliance name, may be null..</param>
 /// <param name="number">Alliance number. (required).</param>
 /// <param name="backup">backup.</param>
 /// <param name="pick">Order the team was picked in the alliance from 0-2, with 0 being alliance captain. (required).</param>
 public TeamEventStatusAlliance(string name = default(string), int number = default(int), TeamEventStatusAllianceBackup backup = default(TeamEventStatusAllianceBackup), int pick = default(int))
 {
     this.Number = number;
     this.Pick   = pick;
     this.Name   = name;
     this.Backup = backup;
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TeamEventStatusAlliance" /> class.
        /// </summary>
        /// <param name="name">Alliance name, may be null..</param>
        /// <param name="number">Alliance number. (required).</param>
        /// <param name="backup">backup.</param>
        /// <param name="pick">Order the team was picked in the alliance from 0-2, with 0 being alliance captain. (required).</param>
        public TeamEventStatusAlliance(string name = default(string), int number = default(int), TeamEventStatusAllianceBackup backup = default(TeamEventStatusAllianceBackup), int pick = default(int))
        {
            // to ensure "number" is required (not null)
            if (number == null)
            {
                throw new InvalidDataException("number is a required property for TeamEventStatusAlliance and cannot be null");
            }
            else
            {
                this.Number = number;
            }

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

            this.Name   = name;
            this.Backup = backup;
        }