IServerChannelSinkProvider.CreateSink Method (IChannelReceiver)

 

Creates a sink chain.

Namespace:   System.Runtime.Remoting.Channels
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
IServerChannelSink CreateSink(
	IChannelReceiver channel
)

Parameters

channel
Type: System.Runtime.Remoting.Channels.IChannelReceiver

The channel for which to create the channel sink chain.

Return Value

Type: System.Runtime.Remoting.Channels.IServerChannelSink

The first sink of the newly formed channel sink chain, or null, which indicates that this provider will not or cannot provide a connection for this endpoint.

Exception Condition
SecurityException

The immediate caller does not have infrastructure permission.

IServerChannelSink nextSink = null;
if (nextProvider != null)
{
      Console.WriteLine("The next server provider is:"
                                       +nextProvider);
   // Create a sink chain calling the 'SaopServerFormatterProvider'
   // 'CreateSink' method.
   nextSink = nextProvider.CreateSink(channel);
}
return new MyServerChannelSink(nextSink);

SecurityPermission

for operating with infrastructure code. Demand value: SecurityAction.LinkDemand; Permission value: SecurityPermissionFlag.Infrastructure

.NET Framework
Available since 1.1
Return to top
Show: