Esempio n. 1
0
        private static void read()
        {
            foreach (object o in _messages.GetConsumingEnumerable(_cancellationSource.Token))
            {
                // TODO -- should this be async as well?  Or assume that the remote listener will handle it?
                var json = MessagingHub.ToJson(o);
                _remoteListener.Send(json);

                // TODO -- send to a local messaging hub?
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Really only for testing
 /// </summary>
 /// <param name="message"></param>
 public void SendObject(object message)
 {
     Send(MessagingHub.ToJson(message));
 }