コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductSession" /> class.
 /// </summary>
 /// <param name="Id">Id.</param>
 /// <param name="OpenTime">OpenTime (required).</param>
 /// <param name="StartTime">StartTime (required).</param>
 /// <param name="StopTime">StopTime (required).</param>
 /// <param name="CloseTime">CloseTime (required).</param>
 /// <param name="SundayOpenTime">SundayOpenTime.</param>
 public ProductSession(int?Id = null, TradeTime OpenTime = null, TradeTime StartTime = null, TradeTime StopTime = null, TradeTime CloseTime = null, TradeTime SundayOpenTime = null)
 {
     // to ensure "OpenTime" is required (not null)
     if (OpenTime == null)
     {
         throw new InvalidDataException("OpenTime is a required property for ProductSession and cannot be null");
     }
     else
     {
         this.OpenTime = OpenTime;
     }
     // to ensure "StartTime" is required (not null)
     if (StartTime == null)
     {
         throw new InvalidDataException("StartTime is a required property for ProductSession and cannot be null");
     }
     else
     {
         this.StartTime = StartTime;
     }
     // to ensure "StopTime" is required (not null)
     if (StopTime == null)
     {
         throw new InvalidDataException("StopTime is a required property for ProductSession and cannot be null");
     }
     else
     {
         this.StopTime = StopTime;
     }
     // to ensure "CloseTime" is required (not null)
     if (CloseTime == null)
     {
         throw new InvalidDataException("CloseTime is a required property for ProductSession and cannot be null");
     }
     else
     {
         this.CloseTime = CloseTime;
     }
     this.Id             = Id;
     this.SundayOpenTime = SundayOpenTime;
 }
コード例 #2
0
ファイル: ChartCustomSession.cs プロジェクト: llinder/api
 /// <summary>
 /// Initializes a new instance of the <see cref="ChartCustomSession" /> class.
 /// </summary>
 /// <param name="StartTime">StartTime (required).</param>
 /// <param name="StopTime">StopTime (required).</param>
 public ChartCustomSession(TradeTime StartTime = default(TradeTime), TradeTime StopTime = default(TradeTime))
 {
     // to ensure "StartTime" is required (not null)
     if (StartTime == null)
     {
         throw new InvalidDataException("StartTime is a required property for ChartCustomSession and cannot be null");
     }
     else
     {
         this.StartTime = StartTime;
     }
     // to ensure "StopTime" is required (not null)
     if (StopTime == null)
     {
         throw new InvalidDataException("StopTime is a required property for ChartCustomSession and cannot be null");
     }
     else
     {
         this.StopTime = StopTime;
     }
 }