コード例 #1
0
ファイル: RemotingServices.cs プロジェクト: zhufengGNSS/mono
        static IMessageSink GetClientChannelSinkChain(string url, object channelData, out string objectUri)
        {
            IMessageSink sink = ChannelServices.CreateClientChannelSinkChain(url, channelData, out objectUri);

            if (sink == null)
            {
                if (url != null)
                {
                    string msg = String.Format("Cannot create channel sink to connect to URL {0}. An appropriate channel has probably not been registered.", url);
                    throw new RemotingException(msg);
                }
                else
                {
                    string msg = String.Format("Cannot create channel sink to connect to the remote object. An appropriate channel has probably not been registered.", url);
                    throw new RemotingException(msg);
                }
            }
            return(sink);
        }