static void Main(string[] args) { Console.WriteLine("@publisher !!! porto -> {0}", args[0]); string[] arguments = args[0].Split(';');//arguments[0]->port; arguments[1]->url; arguments[2]->nome; arguments[3]->site; TcpChannel channel = new TcpChannel(Int32.Parse(arguments[0])); ChannelServices.RegisterChannel(channel, true); MPMPubImplementation MPMpublish = new MPMPubImplementation(); RemotingServices.Marshal(MPMpublish, "PuppetMasterURL", typeof(MPMPubImplementation)); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("@publisher !!! porto -> {0}", args[0]); string[] arguments = args[0].Split(';');//arguments[0]->port; arguments[1]->url; arguments[2]->nome; arguments[3]->site;arguments[4]->urlBroker List<string> urlBrokerList = new List<string>(); for (int i = 4; i < arguments.Length; i++) { urlBrokerList.Add(arguments[i]); } TcpChannel channel = new TcpChannel(Int32.Parse(arguments[0])); ChannelServices.RegisterChannel(channel, true); MPMPubImplementation MPMpublish = new MPMPubImplementation(arguments[0], arguments[1], arguments[3], arguments[2],urlBrokerList); RemotingServices.Marshal(MPMpublish, "PMPublish", typeof(MPMPubImplementation)); MPMPublisherCmd processCmd = new MPMPublisherCmd(); RemotingServices.Marshal(processCmd, "MPMProcessCmd", typeof(MPMPublisherCmd)); Console.ReadLine(); }