private void Send(object msg)
 {
     if (msg is Watch w)
     {
         var rw = new RemoteWatch(w.Watcher, _pid);
         EndpointManager.RemoteWatch(rw);
     }
     else if (msg is Unwatch uw)
     {
         var ruw = new RemoteUnwatch(uw.Watcher, _pid);
         EndpointManager.RemoteUnwatch(ruw);
     }
     else
     {
         Remote.SendMessage(_pid, msg, -1);
     }
 }
Пример #2
0
        private void Send(object msg)
        {
            switch (msg)
            {
            case Watch w:
            {
                var rw = new RemoteWatch(w.Watcher, _pid);
                EndpointManager.RemoteWatch(rw);
                break;
            }

            case Unwatch uw:
            {
                var ruw = new RemoteUnwatch(uw.Watcher, _pid);
                EndpointManager.RemoteUnwatch(ruw);
                break;
            }

            default:
                Remote.SendMessage(_pid, msg, -1);
                break;
            }
        }