private void SendRequest(ISubscriptionMessage request, Subscription subscription) { lock (_syncObject) _requests.Add(request.TransactionId, Tuple.Create(request, subscription)); _connector.AddInfoLog(request.IsSubscribe ? LocalizedStrings.SubscriptionSent : LocalizedStrings.UnSubscriptionSent, subscription.Security?.Id, subscription); _connector.SendInMessage((Message)request); }
private void ChangeState(Subscription subscription, SubscriptionStates state) { const string text = "Subscription {0} {1}->{2}."; if (subscription.State.IsOk(state)) { _connector.AddInfoLog(text, subscription.TransactionId, subscription.State, state); } else { _connector.AddWarningLog(text, subscription.TransactionId, subscription.State, state); } subscription.State = state; }
private void Remove(long id) { // keed subscription instancies for tracing purpose //_subscriptions.Remove(id); _connector.AddInfoLog("Subscription {0} removed.", id); }
private void Remove(long id) { // keed subscription instancies for tracing purpose //_subscriptions.Remove(id); _connector.AddInfoLog(LocalizedStrings.SubscriptionRemoved, id); }
private void ChangeState(Subscription subscription, SubscriptionStates state) { _connector.AddInfoLog("Subscription {0} {1}->{2}.", subscription.TransactionId, subscription.State, state); subscription.State = state; }
private void Remove(long id) { _subscriptions.Remove(id); _connector.AddInfoLog(LocalizedStrings.SubscriptionRemoved, id); }