コード例 #1
0
 public void Handle(PositionAcquired message)
 {
     Bus.Publish(new CallMeIn15SecondsWith(new RemoveFromLow(message.PriceId)));
     Bus.Publish(new CallMeIn30SecondsWith(new RemoveFromHigh(message.PriceId)));
     _lowPrices.Add(message.PriceId, message.Price);
     _highPrices.Add(message.PriceId, message.Price);
     _positionPriceId = message.PriceId;
     _positionPrice = message.Price;
 }
コード例 #2
0
 public bool Equals(PositionAcquired other)
 {
     if (ReferenceEquals(null, other))
     {
         return false;
     }
     if (ReferenceEquals(this, other))
     {
         return true;
     }
     return other.Price == Price && other.PriceId.Equals(PriceId);
 }