当前位置: 首页>>代码示例>>C#>>正文


C# IChannelReceiver.GetUrlsForUri方法代码示例

本文整理汇总了C#中IChannelReceiver.GetUrlsForUri方法的典型用法代码示例。如果您正苦于以下问题:C# IChannelReceiver.GetUrlsForUri方法的具体用法?C# IChannelReceiver.GetUrlsForUri怎么用?C# IChannelReceiver.GetUrlsForUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IChannelReceiver的用法示例。


在下文中一共展示了IChannelReceiver.GetUrlsForUri方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateSink

 public IServerChannelSink CreateSink(IChannelReceiver channel)
 {
     if (channel == null)
     {
         throw new ArgumentNullException("channel");
     }
     IServerChannelSink nextSink = null;
     if (this._next != null)
     {
         nextSink = this._next.CreateSink(channel);
     }
     BinaryServerFormatterSink.Protocol other = BinaryServerFormatterSink.Protocol.Other;
     string strB = channel.GetUrlsForUri("")[0];
     if (string.Compare("http", 0, strB, 0, 4, StringComparison.OrdinalIgnoreCase) == 0)
     {
         other = BinaryServerFormatterSink.Protocol.Http;
     }
     return new BinaryServerFormatterSink(other, nextSink, channel) { TypeFilterLevel = this._formatterSecurityLevel, IncludeVersioning = this._includeVersioning, StrictBinding = this._strictBinding };
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:19,代码来源:BinaryServerFormatterSinkProvider.cs

示例2: CreateSink

        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if(null == channel)
            {
                throw new ArgumentNullException("channel");               
            }

            IServerChannelSink nextSink = null;
            if (_next != null)
                nextSink = _next.CreateSink(channel);

            BinaryServerFormatterSink.Protocol protocol = 
                BinaryServerFormatterSink.Protocol.Other;

            // see if this is an http channel
            String uri = channel.GetUrlsForUri("")[0];
            if (String.Compare("http", 0, uri, 0, 4, StringComparison.OrdinalIgnoreCase) == 0)
                protocol = BinaryServerFormatterSink.Protocol.Http;            

            BinaryServerFormatterSink sink = new BinaryServerFormatterSink(protocol, nextSink, channel);
            sink.TypeFilterLevel = _formatterSecurityLevel;
            sink.IncludeVersioning = _includeVersioning;
            sink.StrictBinding = _strictBinding;
            return sink;
        } // CreateSink
开发者ID:salim18,项目名称:DemoProject2,代码行数:25,代码来源:BinaryFormatterSinks.cs

示例3: CreateSink

        } // GetChannelData
   
        /// <include file='doc\SoapFormatterSinks.uex' path='docs/doc[@for="SoapServerFormatterSinkProvider.CreateSink"]/*' />
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if(null == channel)
            {
                throw new ArgumentNullException("channel");               
            }

            IServerChannelSink nextSink = null;
            if (_next != null)
                nextSink = _next.CreateSink(channel);

            SoapServerFormatterSink.Protocol protocol = 
                SoapServerFormatterSink.Protocol.Other;

            // see if this is an http channel
            String uri = channel.GetUrlsForUri("")[0];
            if (String.Compare("http", 0, uri, 0, 4, true, CultureInfo.InvariantCulture) == 0)
                protocol = SoapServerFormatterSink.Protocol.Http;  

            SoapServerFormatterSink sink = new SoapServerFormatterSink(protocol, nextSink, channel);
            sink.IncludeVersioning = _includeVersioning;
            sink.StrictBinding = _strictBinding;
            return sink;
        }
开发者ID:ArildF,项目名称:masters,代码行数:27,代码来源:soapformattersinks.cs

示例4: Start

		public string[] Start(ChannelManager cm)
		{
			try
			{
				ch = cm.CreateServerChannel ();
				ChannelServices.RegisterChannel ((IChannel)ch);
				RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test1", WellKnownObjectMode.SingleCall);
				RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test2", WellKnownObjectMode.SingleCall);
				RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test3", WellKnownObjectMode.SingleCall);
				string[] uris = new string[3];
				uris[0] = ch.GetUrlsForUri ("test1")[0];
				uris[1] = ch.GetUrlsForUri ("test2")[0];
				uris[2] = ch.GetUrlsForUri ("test3")[0];
				return uris;
			}
			catch (Exception ex)
			{
				Console.WriteLine (ex.ToString());
				throw;
			}
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:21,代码来源:BaseCalls.cs


注:本文中的IChannelReceiver.GetUrlsForUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。