本文整理汇总了C#中IClientChannelSinkProvider类的典型用法代码示例。如果您正苦于以下问题:C# IClientChannelSinkProvider类的具体用法?C# IClientChannelSinkProvider怎么用?C# IClientChannelSinkProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IClientChannelSinkProvider类属于命名空间,在下文中一共展示了IClientChannelSinkProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HttpChannel
} // HttpChannel
public HttpChannel(IDictionary properties,
IClientChannelSinkProvider clientSinkProvider,
IServerChannelSinkProvider serverSinkProvider)
{
Hashtable clientData = new Hashtable();
Hashtable serverData = new Hashtable();
// divide properties up for respective channels
if (properties != null)
{
foreach (DictionaryEntry entry in properties)
{
switch ((String)entry.Key)
{
// general channel properties
case "name": _channelName = (String)entry.Value; break;
case "priority": _channelPriority = Convert.ToInt32((String)entry.Value, CultureInfo.InvariantCulture); break;
case "secure": _secure = Convert.ToBoolean(entry.Value, CultureInfo.InvariantCulture);
clientData["secure"] = entry.Value;
serverData["secure"] = entry.Value;
break;
default:
clientData[entry.Key] = entry.Value;
serverData[entry.Key] = entry.Value;
break;
}
}
}
_clientChannel = new HttpClientChannel(clientData, clientSinkProvider);
_serverChannel = new HttpServerChannel(serverData, serverSinkProvider);
} // HttpChannel
示例2: TcpClientChannel
public TcpClientChannel (IDictionary properties, IClientChannelSinkProvider sinkProvider)
{
if (properties != null) {
object val = properties ["name"];
if (val != null) name = val as string;
val = properties ["priority"];
if (val != null) priority = Convert.ToInt32 (val);
}
if (sinkProvider != null)
{
_sinkProvider = sinkProvider;
// add the tcp provider at the end of the chain
IClientChannelSinkProvider prov = sinkProvider;
while (prov.Next != null) prov = prov.Next;
prov.Next = new TcpClientTransportSinkProvider ();
// Note: a default formatter is added only when
// no sink providers are specified in the config file.
}
else
{
_sinkProvider = new BinaryClientFormatterSinkProvider ();
_sinkProvider.Next = new TcpClientTransportSinkProvider ();
}
}
示例3: TcpClientChannel
// constructor used by config file
/// <include file='doc\TcpClientChannel.uex' path='docs/doc[@for="TcpClientChannel.TcpClientChannel2"]/*' />
public TcpClientChannel(IDictionary properties, IClientChannelSinkProvider sinkProvider)
{
if (properties != null)
{
foreach (DictionaryEntry entry in properties)
{
switch ((String)entry.Key)
{
case "name": _channelName = (String)entry.Value; break;
case "priority": _channelPriority = Convert.ToInt32(entry.Value); break;
default:
throw new ArgumentException(
String.Format(
CoreChannel.GetResourceString(
"Remoting_Channels_BadCtorArgs"),
entry.Key));
}
}
}
_sinkProvider = sinkProvider;
SetupChannel();
} // TcpClientChannel
示例4: ClientWorkflowInvoker
/// <summary></summary>
public ClientWorkflowInvoker(IDictionary properties, IClientChannelSinkProvider clientSinkProvider)
{
try
{
// configuration file
if(properties.Contains("timeout"))
_TimeOut = Convert.ToInt32(properties["timeout"]);
if (properties.Contains("name"))
_ChannelName = Convert.ToString(properties["name"]);
if (properties.Contains("callcontextActor"))
_CallContextActor = Convert.ToString(properties["callcontextActor"]);
// channel provider
_Provider = clientSinkProvider == null ? new BinaryClientFormatterSinkProvider() : clientSinkProvider;
// add the ClientWorkflowInvokerProvider at the end
IClientChannelSinkProvider provider = _Provider;
while (provider.Next != null)
{
provider = provider.Next;
}
provider.Next = new ClientWorkflowInvokerProvider();
}
catch(Exception ex)
{
Trace.WriteLine(ex);
}
}
示例5: IpcClientChannel
} // IpcClientChannel
public IpcClientChannel(String name, IClientChannelSinkProvider sinkProvider)
{
_channelName = name;
_sinkProvider = sinkProvider;
SetupChannel();
}
示例6: HttpClientChannel
public HttpClientChannel(String name, IClientChannelSinkProvider sinkProvider)
{
if(name != null)
_channelName = name;
SetupProvider (sinkProvider, null);
}
示例7: Start
/// <summary>
/// Start connection with specified engine interface
/// </summary>
/// <param name="typeEngineInterface">Type of engine interface</param>
/// <param name="urlClient">Asscoiated URL</param>
/// <param name="ensureSecurity">Remoting security attribute</param>
public void Start(string urlClient, bool ensureSecurity, uint timeOut, Type iProxyType)
{
Trace.TraceInformation("Configuring client connection");
_ensureSecurity = ensureSecurity;
IDictionary t = new Hashtable();
t.Add("timeout", timeOut);
t.Add("name", urlClient);
#if MONO
_sinkProvider = new BinaryClientFormatterSinkProvider();
#endif
#if MONO
/* MoMA moans about this line, but not clear why?
Message 10 MonoTodo: void HttpClientChannel..ctor(IDictionary, IClientChannelSinkProvider)
Reason: Handle the machineName, proxyName, proxyPort, servicePrincipalName, useAuthenticatedConnectionSharing properties D:\Source\Projects\FluidEarth_Trunk\FluidEarth\SDK\src\ConnectionHttp.cs 148 14 PluginInterfaces
*/
_channel = new HttpClientChannel(t, _sinkProvider);
#else
// need to make ChannelNames unique so need to use this
// constructor even though we dont care about the sink provider
_channel = new HttpClientChannel(t, _sinkProvider);
#endif
ChannelServices.RegisterChannel(_channel, _ensureSecurity);
Trace.TraceInformation("Configured client connection");
_base = (IBase)Activator.GetObject(iProxyType, urlClient);
Trace.TraceInformation("Acquired proxy");
}
示例8: UdpClientChannel
public UdpClientChannel(IDictionary properties, IClientChannelSinkProvider provider)
{
ChannelName = properties.GetValue("name", UdpChannelHelper.DefaultName);
ChannelPriority = properties.GetValue("priority", UdpChannelHelper.DefaultPriority);
ClientSinkProvider = provider ?? UdpChannelHelper.CreateClientSinkProvider();
SetupClientProviderChain(ClientSinkProvider, new UdpClientChannelSinkProvider());
}
示例9: IpcClientChannel
/// <summary>
/// Creates a client channel.
/// </summary>
/// <param name="properties">The properties.</param>
/// <param name="sinkProvider">The provider</param>
public IpcClientChannel(IDictionary properties, IClientChannelSinkProvider provider)
{
if (properties != null)
{
foreach (DictionaryEntry e in properties)
{
switch ((string)e.Key)
{
case "name":
channelName = (string)e.Value;
break;
case "priority":
channelPriority = Convert.ToInt32(e.Value);
break;
}
}
}
if (provider == null)
{
clientProvider = new BinaryClientFormatterSinkProvider();
clientProvider.Next = new IpcClientChannelSinkProvider();
}
else
{
// add us to the sink chain.
clientProvider = provider;
IClientChannelSinkProvider p;
for (p = clientProvider; p.Next != null; p = p.Next) {}
p.Next = new IpcClientChannelSinkProvider();
}
}
示例10: IpcClientChannel
public IpcClientChannel(string name, IClientChannelSinkProvider sinkProvider)
{
this._channelPriority = 1;
this._channelName = "ipc client";
this._channelName = name;
this._sinkProvider = sinkProvider;
this.SetupChannel();
}
示例11: IpcClientChannel
public IpcClientChannel (IDictionary properties,
IClientChannelSinkProvider sinkProvider)
{
if (IpcChannel.IsUnix)
_innerChannel = new Unix.IpcClientChannel (properties, sinkProvider);
else
_innerChannel = new Win32.IpcClientChannel (properties, sinkProvider);
}
示例12: IpcChannel
/// <summary>
/// Creates both server and client channels.
/// </summary>
/// <param name="properties">The channel properties.</param>
/// <param name="clientProvider">The client sink provider. It may be <c>null</c>.</param>
/// <param name="serverProvider">The server sink provider. It may be <c>null</c>.</param>
public IpcChannel(IDictionary properties,
IClientChannelSinkProvider clientProvider,
IServerChannelSinkProvider serverProvider
)
{
clientChannel = new IpcClientChannel(properties, clientProvider);
serverChannel = new IpcServerChannel(properties, serverProvider);
}
示例13: PipeChannel
public PipeChannel(
IDictionary properties,
IClientChannelSinkProvider clientProviderChain,
IServerChannelSinkProvider serverProviderChain
)
{
_clientChannel = new PipeClientChannel(properties, clientProviderChain);
_serverChannel = new PipeServerChannel(properties, serverProviderChain);
}
示例14: IpcChannel
public IpcChannel (IDictionary properties,
IClientChannelSinkProvider clientSinkProvider,
IServerChannelSinkProvider serverSinkProvider)
{
if (IsUnix)
_innerChannel = new Unix.IpcChannel (properties, clientSinkProvider, serverSinkProvider);
else
_innerChannel = new Win32.IpcChannel (properties, clientSinkProvider, serverSinkProvider);
}
示例15: PipeClientChannel
public PipeClientChannel(
IDictionary properties,
IClientChannelSinkProvider clientProviderChain
)
{
InitDefaults();
InitProperties(properties);
InitProviders(clientProviderChain);
}