Esempio n. 1
0
        /// <summary>
        /// Detach the client from reading it's messages
        /// </summary>
        public void Detach(TmqClient client)
        {
            client.MessageReceived -= ClientOnMessageReceived;

            lock (_attachedClients)
                _attachedClients.Remove(client);
        }
Esempio n. 2
0
        /// <summary>
        /// Attach the client to the message reader and starts to read messages
        /// </summary>
        public void Attach(TmqClient client)
        {
            client.MessageReceived += ClientOnMessageReceived;

            lock (_attachedClients)
                _attachedClients.Add(client);
        }
Esempio n. 3
0
 public MessageFollower(TmqClient client)
 {
     _client = client;
 }
Esempio n. 4
0
 /// <summary>
 /// Reads the received model, if there is subscription to the model, trigger the actions.
 /// Use this method when you can't attach the client easily or directly. (ex: use for connections)
 /// </summary>
 public void Read(TmqClient sender, TmqMessage message)
 {
     ClientOnMessageReceived(sender, message);
 }