コード例 #1
0
 public RemoteClient()
 {
     try
     {
         ChannelServices.RegisterChannel(chan, false);
         remoteObject = (FilterRemoteObject)Activator.GetObject(typeof(FilterRemoteObject), "tcp://localhost:65118/filterAPIs");
     }
     catch (Exception ex)
     {
         throw new Exception("Create remoteClient object failed." + ex.Message);
     }
 }
コード例 #2
0
 public void Start()
 {
     try
     {
         remoteObject = new FilterRemoteObject();
         ChannelServices.RegisterChannel(channel, false);
         RemotingConfiguration.RegisterWellKnownServiceType(typeof(FilterRemoteObject), "filterAPIs", WellKnownObjectMode.Singleton);
         Cache.Attach(this);
     }
     catch (Exception ex)
     {
         throw new Exception("Create remote server failed." + ex.Message);
     }
 }