private void OnConnectorOrderLogItemReceived(Subscription subscription, OrderLogItem ol) { if (_subscriptions.ContainsKey(subscription)) { OrderLogItemReceived?.Invoke(subscription, ol); } }
/// <summary> /// Добавить новую лог-заявку. /// </summary> /// <param name="item">Новая лог-заявка.</param> protected virtual void AddOrderLog(OrderLogItem item) { if (item == null) { throw new ArgumentNullException("item"); } _orderLogBuffer.Add(item.Order.Security, item); }
private void RaiseNewOrderLogItem(OrderLogItem item) { NewOrderLogItem.SafeInvoke(item); var multiEvt = NewOrderLogItems; if (multiEvt == null) { return; } multiEvt.SafeInvoke(new[] { item }); }
public void AddOperation(OrderLogItem item) { _lastOperationTime = item.Order.Time; _operationCount++; _operationCountPerSecond++; if (item.Order.State == OrderStates.Active && item.Order.IsMatchedEmpty()) { _orderCount++; _orderCountPerSecond++; } else if (item.Trade != null) { _tradeCount++; _tradeCountPerSecond++; } }
/// <summary> /// To check, does the order log contain the order matching. /// </summary> /// <param name="item">Order log item.</param> /// <returns><see langword="true" />, if the order log contains order matching, otherwise, <see langword="false" />.</returns> public static bool IsMatched(this OrderLogItem item) { return(item.ToMessage().IsOrderLogMatched()); }
/// <summary> /// To check, does the order log contain the cancelled order. /// </summary> /// <param name="item">Order log item.</param> /// <returns><see langword="true" />, if the order log contain the cancelled order, otherwise, <see langword="false" />.</returns> public static bool IsCanceled(this OrderLogItem item) { return(item.ToMessage().IsOrderLogCanceled()); }
/// <summary> /// To check, does the order log contain the order registration. /// </summary> /// <param name="item">Order log item.</param> /// <returns><see langword="true" />, if the order log contains the order registration, otherwise, <see langword="false" />.</returns> public static bool IsRegistered(this OrderLogItem item) { return(item.ToMessage().IsOrderLogRegistered()); }
/// <summary> /// To get the reason for cancelling order in orders log. /// </summary> /// <param name="item">Order log item.</param> /// <returns>The reason for order cancelling in order log.</returns> public static OrderLogCancelReasons GetCancelReason(this OrderLogItem item) { return(item.ToMessage().GetOrderLogCancelReason()); }
private void RaiseNewOrderLogItem(OrderLogItem item) { NewOrderLogItem?.Invoke(item); NewOrderLogItems?.Invoke(new[] { item }); }
private void NewOrderLogItemHandler(OrderLogItem item) { AddGuiAction(() => NewOrderLogItem.SafeInvoke(item)); }
public OrderLogItemViewModel(OrderLogItem model) { _model = model; }