コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Zebra" /> class.
 /// </summary>
 /// <param name="key">TBA match key with the format &#x60;yyyy[EVENT_CODE]_[COMP_LEVEL]m[MATCH_NUMBER]&#x60;, where &#x60;yyyy&#x60; is the year, and &#x60;EVENT_CODE&#x60; is the event code of the event, &#x60;COMP_LEVEL&#x60; is (qm, ef, qf, sf, f), and &#x60;MATCH_NUMBER&#x60; is the match number in the competition level. A set number may be appended to the competition level if more than one match in required per set. (required).</param>
 /// <param name="times">A list of relative timestamps for each data point. Each timestamp will correspond to the X and Y value at the same index in a team xs and ys arrays. &#x60;times&#x60;, all teams &#x60;xs&#x60; and all teams &#x60;ys&#x60; are guarenteed to be the same length. (required).</param>
 /// <param name="alliances">alliances (required).</param>
 public Zebra(string key = default(string), List <double> times = default(List <double>), ZebraAlliances alliances = default(ZebraAlliances))
 {
     // to ensure "key" is required (not null)
     this.Key = key ?? throw new ArgumentNullException("key is a required property for Zebra and cannot be null");
     // to ensure "times" is required (not null)
     this.Times = times ?? throw new ArgumentNullException("times is a required property for Zebra and cannot be null");
     // to ensure "alliances" is required (not null)
     this.Alliances = alliances ?? throw new ArgumentNullException("alliances is a required property for Zebra and cannot be null");
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Zebra" /> class.
        /// </summary>
        /// <param name="key">TBA match key with the format &#x60;yyyy[EVENT_CODE]_[COMP_LEVEL]m[MATCH_NUMBER]&#x60;, where &#x60;yyyy&#x60; is the year, and &#x60;EVENT_CODE&#x60; is the event code of the event, &#x60;COMP_LEVEL&#x60; is (qm, ef, qf, sf, f), and &#x60;MATCH_NUMBER&#x60; is the match number in the competition level. A set number may be appended to the competition level if more than one match in required per set. (required).</param>
        /// <param name="times">A list of relative timestamps for each data point. Each timestamp will correspond to the X and Y value at the same index in a team xs and ys arrays. &#x60;times&#x60;, all teams &#x60;xs&#x60; and all teams &#x60;ys&#x60; are guarenteed to be the same length. (required).</param>
        /// <param name="alliances">alliances (required).</param>
        public Zebra(string key = default(string), List <double> times = default(List <double>), ZebraAlliances alliances = default(ZebraAlliances))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for Zebra and cannot be null");
            }
            else
            {
                this.Key = key;
            }

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

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