static void Main(string[] args) { ProcessCreationService pcs = new ProcessCreationService(); Console.WriteLine("<Enter to exit> "); Console.ReadLine(); }
static void Main(string[] args) { //Post the PCS remote service TcpChannel channel = new TcpChannel(10000); ChannelServices.RegisterChannel(channel, true); ProcessCreationService PCS = new ProcessCreationService(); RemotingServices.Marshal(PCS, "ProcessCreationService", typeof(ProcessCreationService)); System.Console.WriteLine("<enter> para sair..."); System.Console.ReadLine(); }
static void Main(string[] args) { TcpChannel channel = new TcpChannel(PCS_PORT); ProcessCreationService pcs = new ProcessCreationService(); ChannelServices.RegisterChannel(channel, false); RemotingServices.Marshal( pcs, "PCS", typeof(ProcessCreationService) ); Console.WriteLine($"PCS running on port {PCS_PORT}."); Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }
static void Main(string[] args) { BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider(); provider.TypeFilterLevel = TypeFilterLevel.Full; IDictionary props = new Hashtable(); props["port"] = PCS_PORT; TcpChannel channel = new TcpChannel(props, null, provider); ChannelServices.RegisterChannel(channel, false); ProcessCreationService pcs = new ProcessCreationService(); RemotingServices.Marshal(pcs, PCS_NAME, typeof(ProcessCreationService)); Console.WriteLine("Process Creation Service is running.\nPress <enter> to exit..."); Console.ReadLine(); }