Exemplo n.º 1
0
 public ChangeSender1(ILocalDbReader localDbReader,
                      IChangeReceiver changeReceiverClientProxy)
 {
     _ui    = SynchronizationContext.Current;
     _local = localDbReader;
     _hub   = changeReceiverClientProxy;
 }
Exemplo n.º 2
0
        public void UnsubscribeEntitiesChanged(IChangeReceiver receiver)
        {
            _entitiesChangedDispatcher.Remove((MarshalByRefObject)receiver);

            if (Log.IsDebugEnabled)
            {
                Log.Debug(
                    string.Format("UnsubscribeEntitiesChanged: Client with {0} session id has been UNregistered.",
                                  (GenuineUtility.CurrentSession["id"] as SessionId).Id));
            }
        }
Exemplo n.º 3
0
        public void SubscribeEntitiesChanged(IChangeReceiver receiver)
        {
            // save symbol to client's session
            //GenuineUtility.CurrentSession["symbol"] = symbol;
            // and subscribe the receiver
            _entitiesChangedDispatcher.Add((MarshalByRefObject)receiver, GenuineUtility.CurrentSession);

            if (Log.IsDebugEnabled)
            {
                Log.Debug(
                    string.Format("SubscribeEntitiesChanged: Client with {0} session id has been registered.",
                                  (GenuineUtility.CurrentSession["id"] as SessionId).Id));
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Use events for local needs instead of this
 /// </summary>
 public void UnsubscribeEntitiesChanged(IChangeReceiver receiver)
 {
     throw new ApplicationException("Remote using only method");
 }