System.Runtime.Remoting.Channels.Tcp.TcpChannel.Parse C# (CSharp) Method

Parse() private method

private Parse ( String url, String &objectURI ) : String
url String
objectURI String
return String
        public String Parse(String url, out String objectURI)
        {            
            return TcpChannelHelper.ParseURL(url, out objectURI);
        } // Parse
        

Usage Example

示例#1
0
        static void Main(string[] args)
        {
            var serverChannel = new TcpChannel(8082);
            ChannelServices.RegisterChannel(serverChannel);
            RemotingConfiguration.ApplicationName = "TestServer";
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(IServer), "MyServerUri", WellKnownObjectMode.SingleCall);

            // Parse the channel's URI.
            string[] urls = serverChannel.GetUrlsForUri("MyServerUri");
            if (urls.Length > 0) {
                string objectUrl = urls[0];
                string objectUri;
                string channelUri = serverChannel.Parse(objectUrl, out objectUri);
                Console.WriteLine("The object URL is {0}.", objectUrl);
                Console.WriteLine("The object URI is {0}.", objectUri);
                Console.WriteLine("The channel URI is {0}.", channelUri);
            }

            Console.WriteLine("press a key to exit");
            Console.ReadLine();
        }
All Usage Examples Of System.Runtime.Remoting.Channels.Tcp.TcpChannel::Parse