示例#1
0
            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;
            }
示例#3
0
 private void Remove(long id)
 {
     // keed subscription instancies for tracing purpose
     //_subscriptions.Remove(id);
     _connector.AddInfoLog("Subscription {0} removed.", id);
 }
示例#4
0
 private void Remove(long id)
 {
     // keed subscription instancies for tracing purpose
     //_subscriptions.Remove(id);
     _connector.AddInfoLog(LocalizedStrings.SubscriptionRemoved, id);
 }
示例#5
0
 private void ChangeState(Subscription subscription, SubscriptionStates state)
 {
     _connector.AddInfoLog("Subscription {0} {1}->{2}.", subscription.TransactionId, subscription.State, state);
     subscription.State = state;
 }
示例#6
0
 private void Remove(long id)
 {
     _subscriptions.Remove(id);
     _connector.AddInfoLog(LocalizedStrings.SubscriptionRemoved, id);
 }