示例#1
0
 public void Handle(RemoveFromLow message)
 {
     var price = _lowPrices[message.PriceId];
     _lowPrices.Remove(message.PriceId);
     if (_lowPrices.Count == 0 || _lowPrices.Values.All(x => x <= price))
     {
         if (price < _positionPrice * 0.95m)
             Bus.Publish(new SellStock(_positionPriceId));
     }
 }
 public bool Equals(RemoveFromLow other)
 {
     if (ReferenceEquals(null, other))
     {
         return false;
     }
     if (ReferenceEquals(this, other))
     {
         return true;
     }
     return other.PriceId.Equals(PriceId);
 }