Пример #1
0
 public void InsertRecord(string memberEmail, string stockFullID, StockNotificationType type, DateTime date, BuySellStrategyType strategy, StockBuyState targetState)
 {
     _checkers.Add(ComposeKey(memberEmail, stockFullID, date, type, strategy, targetState));
 }
Пример #2
0
 private string ComposeKey(string memberEmail, string stockFullID, DateTime date, StockNotificationType type, BuySellStrategyType strategy, StockBuyState targetState)
 {
     return($"{strategy.GetString()}.{memberEmail}.{stockFullID}.{date.ToString(_dateFormat)}.{type.ToString()}.{targetState.GetStockBuyStateValue()}");
 }
Пример #3
0
 public bool CanNotify(string memberEmail, string stockFullID, StockNotificationType type, DateTime today, BuySellStrategyType strategy, StockBuyState targetState)
 {
     return(!_checkers.Contains(ComposeKey(memberEmail, stockFullID, today, type, strategy, targetState)));
 }