Ejemplo n.º 1
0
 protected EyesarServer(EyesarSharedObject sharedObject)
 {
     if (ChannelServices.RegisteredChannels.Any(channel => channel.ChannelName == "Eyesar"))
         throw new InvalidOperationException();
     _channel = new IpcServerChannel("Eyesar", "eyesar");
     ChannelServices.RegisterChannel(_channel, false);
     RemotingServices.Marshal(SharedObject = sharedObject, "shared", typeof (EyesarSharedObject));
 }
Ejemplo n.º 2
0
 protected EyesarServer(EyesarSharedObject sharedObject)
 {
     if (ChannelServices.RegisteredChannels.Any(channel => channel.ChannelName == "Eyesar"))
     {
         throw new InvalidOperationException();
     }
     _channel = new IpcServerChannel("Eyesar", "eyesar");
     ChannelServices.RegisterChannel(_channel, false);
     RemotingServices.Marshal(SharedObject = sharedObject, "shared", typeof(EyesarSharedObject));
 }
Ejemplo n.º 3
0
 protected EyesarClient()
 {
     _channel = new IpcClientChannel();
     ChannelServices.RegisterChannel(_channel, false);
     SharedObject = (EyesarSharedObject)Activator.GetObject(typeof(EyesarSharedObject), "ipc://eyesar/shared");
 }