本文整理汇总了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
示例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;
}
示例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;
}
}