System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider Class

Assembly: System.Runtime.Remoting.dll
Namespace: System.Runtime.Remoting.Channels
Summary
Provides the implementation for the binary client formatter sink provider.
C# Syntax:
public class BinaryClientFormatterSinkProvider : IClientFormatterSinkProvider, IClientChannelSinkProvider
Remarks
A BinaryClientFormatterSinkProvider creates client formatter sinks that use the BinaryFormatter to serialize messages for the client channel through which remoting messages flow.

The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the IMessage is forwarded to all sinks in the channel sink chain through the IClientChannelSink.ProcessMessage or IClientChannelSink.AsyncProcessRequest calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the IMessageSink and IClientChannelSink interface. The formatter sink can then be placed in the sink chain later.

Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of an IDictionary. In a configuration file all values are represented by strings, but when building a property IDictionary programmatically, value types can be specified with their native values or with strings.

The following table shows the sink configuration properties that can be specified for the current sink provider.



Property Description
includeVersions true or false . Specifies whether the formatter will include versioning information.
See also:
System.Runtime.Remoting.Channels Namespace | BinaryFormatter | MSDN: channelformatterconfigurationproperties

System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider Member List:

Public Constructors
ctor #1 Overloaded:
.ctor()

Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Initializes a new instance of the BinaryClientFormatterSinkProvider class with default values.
ctor #2 Overloaded:
.ctor(IDictionary properties, ICollection providerData)

Initializes a new instance of the BinaryClientFormatterSinkProvider class with the given properties and provider data.
Public Properties
Next Read-write

Gets or sets the next IClientChannelSinkProvider in the sink provider chain.
Public Methods
CreateSink Creates a sink chain.
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider Member Details

Overloaded ctor #1
Summary
Initializes a new instance of the BinaryClientFormatterSinkProvider class with default values.

Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
public BinaryClientFormatterSinkProvider();

Return to top


Overloaded ctor #2
Summary
Initializes a new instance of the BinaryClientFormatterSinkProvider class with the given properties and provider data.
C# Syntax:
public BinaryClientFormatterSinkProvider(
   IDictionary properties,
   ICollection providerData
);
Parameters:

properties

An IDictionary of configuration properties to use with the new instance of BinaryClientFormatterSinkProvider.

providerData

An ICollection of SinkProviderData objects containing provider data to use with the new instance of BinaryClientFormatterSinkProvider.

See also:
MSDN: channelformatterconfigurationproperties

Return to top


Property: Next (read-write)
Summary
Gets or sets the next IClientChannelSinkProvider in the sink provider chain.
C# Syntax:
public IClientChannelSinkProvider Next {get; set;}
Implements:
IClientChannelSinkProvider.Next

Return to top


Method: CreateSink(
   IChannelSender channel,
   string url,
   object remoteChannelData
)
Summary
Creates a sink chain.
C# Syntax:
public IClientChannelSink CreateSink(
   IChannelSender channel,
   string url,
   object remoteChannelData
);
Parameters:

channel

Channel for which this sink chain is being constructed.

url

URL of object to connect to or the channel URI for the target object.

remoteChannelData

A channel data object describing a channel on the remote server. A channel data object describing a channel on the remote server.

Return Value:
The first sink of the newly formed channel sink chain, or null indicating that this provider will not or cannot provide a connection for this endpoint.
Implements:
IClientChannelSinkProvider.CreateSink
Remarks
When the IClientChannelSinkProvider.CreateSink method is called, it creates its own channel sink, forwards the IClientChannelSinkProvider.CreateSink call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~BinaryClientFormatterSinkProvider();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.