/// <summary>
 /// Initializes a new instance of the <see cref="InlineResponse2003" /> class.
 /// </summary>
 /// <param name="total">total (required).</param>
 /// <param name="scale">scale (required).</param>
 /// <param name="distribution">distribution (required).</param>
 public InlineResponse2003(WalletswalletIdpaymentfeesAmount total = default(WalletswalletIdpaymentfeesAmount), ScaleEnum scale = default(ScaleEnum), Dictionary <string, int?> distribution = default(Dictionary <string, int?>))
 {
     // to ensure "total" is required (not null)
     if (total == null)
     {
         throw new InvalidDataException("total is a required property for InlineResponse2003 and cannot be null");
     }
     else
     {
         this.Total = total;
     }
     // to ensure "scale" is required (not null)
     if (scale == null)
     {
         throw new InvalidDataException("scale is a required property for InlineResponse2003 and cannot be null");
     }
     else
     {
         this.Scale = scale;
     }
     // to ensure "distribution" is required (not null)
     if (distribution == null)
     {
         throw new InvalidDataException("distribution is a required property for InlineResponse2003 and cannot be null");
     }
     else
     {
         this.Distribution = distribution;
     }
 }
예제 #2
0
 internal Scale(ScaleEnum scale, int interval)
 {
     this.scaleType = scale;
     this.interval = interval;
     this.beginning = 0;
     if (scale == ScaleEnum.undefined)
         l.Error("масштаб Scale не определен");
 }
예제 #3
0
 internal Scale(ScaleEnum scale, int interval)
 {
     this.scaleType = scale;
     this.interval  = interval;
     this.beginning = 0;
     if (scale == ScaleEnum.undefined)
     {
         l.Error("масштаб Scale не определен");
     }
 }
예제 #4
0
        internal Scale(ScaleEnum scale, int interval, int beginning)
        {
            this.scaleType = scale;
            this.interval = interval;
            this.beginning = beginning;
            if (scale == ScaleEnum.undefined)
                l.Error("масштаб Scale не определен");

            name = SetName();
        }
예제 #5
0
        internal Scale(ScaleEnum scale, int interval, int beginning)
        {
            this.scaleType = scale;
            this.interval  = interval;
            this.beginning = beginning;
            if (scale == ScaleEnum.undefined)
            {
                l.Error("масштаб Scale не определен");
            }

            name = SetName();
        }
예제 #6
0
        public IScale GetScale(ScaleEnum scale, int interval, int beginning)
        {
            foreach (IScale s in scales)
            {
                if ((s.beginning == beginning) && (s.scaleType == scale) && (s.interval == interval))
                {
                    return(s);
                }
            }

            IScale newS = new Scale(scale, interval, beginning);

            scales.Add(newS);
            return(newS);
        }
예제 #7
0
 /// <summary>
 /// Возвращает строковое значение указанного масштаба.
 /// </summary>
 /// <param name="scale">Масштаб.</param>
 /// <returns></returns>
 public static string GetString(this ScaleEnum scale) => _scaleStringsList[scale];
예제 #8
0
 /// <summary>
 /// Возвращает численное значение указанного масштаба.
 /// </summary>
 /// <param name="scale">Масштаб.</param>
 /// <returns></returns>
 public static double GetValue(this ScaleEnum scale) => _scaleValuesList[scale];
예제 #9
0
 public IBars GetBars(string marketName, string symbol, ScaleEnum scale, int interval)
 {
     return GetBars(GetSymbol(marketName, symbol), GetScale(scale, interval));
 }
예제 #10
0
 public IScale GetScale(ScaleEnum scale, int interval)
 {
     return GetScale(scale, interval, 0);
 }
예제 #11
0
        public IScale GetScale(ScaleEnum scale, int interval, int beginning)
        {
            foreach (IScale s in scales)
                if ((s.beginning == beginning) && (s.scaleType == scale) && (s.interval == interval))
                    return s;

            IScale newS = new Scale(scale, interval, beginning);
            scales.Add(newS);
            return newS;
        }
예제 #12
0
 public IScale GetScale(ScaleEnum scale, int interval)
 {
     return(GetScale(scale, interval, 0));
 }
예제 #13
0
 public IBars GetBars(string marketName, string symbol, ScaleEnum scale, int interval)
 {
     return(GetBars(GetSymbol(marketName, symbol), GetScale(scale, interval)));
 }