Exemplo n.º 1
0
 public SupportedTier Get(string ticker, T period)
 {
     JpTickerValidator.Validate(ticker);
     if (!Has(ticker))
     {
         throw new KeyNotFoundException($"ticker={ticker} is not contained.");
     }
     else
     {
         var supportedTier = tickerTierDict[ticker];
         if (supportedTier.FixedTierRange.Includes(period))
         {
             return(SupportedTier.FixedTier);
         }
         else if (supportedTier.OndemandTierRange.Includes(period))
         {
             return(SupportedTier.OndemandTier);
         }
         else
         {
             return(SupportedTier.None);
         }
     }
 }
Exemplo n.º 2
0
 public void Add(string ticker, SupportedTierRange <T> supportedTierRange)
 {
     JpTickerValidator.Validate(ticker);
     tickerTierDict.Add(ticker, supportedTierRange);
 }
Exemplo n.º 3
0
 public bool Has(string ticker)
 {
     JpTickerValidator.Validate(ticker);
     return(tickerTierDict.ContainsKey(ticker));
 }
 public static TickerEmptyPeriodParameter Create(string ticker, IPeriod period)
 {
     JpTickerValidator.Validate(ticker);
     return(new TickerEmptyPeriodParameter(ticker, period));
 }
Exemplo n.º 5
0
 public static Daily Create(string ticker, DayPeriod period, PropertyDictionary properties, PropertyDescriptionDictionary descriptions)
 {
     JpTickerValidator.Validate(ticker);
     return(new Daily(ticker, period, properties, descriptions));
 }
 public TickerParameterBuilderForLegacy SetTicker(string ticker)
 {
     JpTickerValidator.Validate(ticker);
     this.ticker = ticker;
     return(this);
 }
Exemplo n.º 7
0
 public static TickerPeriodRangeParameter Create(string ticker, IComparablePeriod from, IComparablePeriod to)
 {
     JpTickerValidator.Validate(ticker);
     return(new TickerPeriodRangeParameter(ticker, PeriodRange <IComparablePeriod> .Create(from, to)));
 }
Exemplo n.º 8
0
 public static TickerPeriodRangeParameter Create(string ticker, PeriodRange <IComparablePeriod> periodRange)
 {
     JpTickerValidator.Validate(ticker);
     return(new TickerPeriodRangeParameter(ticker, periodRange));
 }
 public static Indicator Create(string ticker, PropertyDictionary properties, PropertyDescriptionDictionary descriptions)
 {
     JpTickerValidator.Validate(ticker);
     return(new Indicator(ticker, properties, descriptions));
 }
 public static Quarter Create(string ticker, FiscalQuarterPeriod period, PropertyDictionary properties, PropertyDescriptionDictionary descriptions)
 {
     JpTickerValidator.Validate(ticker);
     return(new Quarter(ticker, period, properties, descriptions));
 }