mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Runtime.Remoting.Messaging.IRemotingFormatter System.Runtime.InteropServices.ComVisible(true)

The and classes implement the interface to support remote procedure calls (RPCs), and the interface (inherited by the ) to support serialization of a graph of objects. The class also supports RPCs with objects, without using the functionality.

During RPCs, the interface allows the specification of two separate object graphs: the graph of objects to serialize, and an additional graph that contains an array of header objects that convey information about the remote function call (for example, transaction ID or a method signature).

RPCs that use the separate into two distinct parts: method calls, which are sent to the server with the remote object that contains the method called, and method responses, which are sent from the server to the client with the status and response information from the called method.

During serialization of a method call the first object of the object graph must support the interface. To deserialize a method call, use the method with the parameter. The remoting infrastructure uses the delegate to produce an object that supports the interface. When the invokes the delegate, it returns the URI of the remote object with the method that is being called. The first object in the graph returned supports the interface.

The serialization procedure for a method response is identical to that of a method call, except the first object of the object graph must support the interface. To deserialize a method response, use the method. To save time, details about the caller object are not sent to the remote object during the method call. These details are instead obtained from the original method call, which is passed to the method in the parameter. The first object in the graph returned by the method supports the interface.

## Unpaired Surrogates

Any unpaired surrogate characters are lost in binary serialization. For example, the following string contains a high surrogate Unicode character (\ud800) in between the two Test words:

Test\ud800Test

Before serialization, the byte array of the string is as follows:

Byte Array Value

Character

84

T

101

e

115

s

116

t

55296

\ud800

84

T

101

e

115

s

116

t

After deserialization, the high surrogate Unicode character is lost:

Byte Array Value

Character

84

T

101

e

115

s

116

t

84

T

101

e

115

s

116

t

Serializes and deserializes an object, or an entire graph of connected objects, in binary format.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor sets the properties of the object as follows:

  Property Type

  Condition

  null

  A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()

  Initializes a new instance of the class with default values.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  Initializes a new BinaryFormatter for serialization or deserialization of objects from the specified .

  The serialization or deserialization process uses the specified to search for surrogates that are registered for the object types you want to deserialize. Surrogates are helpers that serialize and deserialize objects of specific classes. The default cannot handle the serialization of objects that derive from the for remoting purposes. In a remoting situation the specified replaces the object derived from with a object that is serialized by the specified surrogate selector. Therefore, if you want to use remote objects, set the parameter to an instance of . If you do not need surrogates, set the parameter to be null.

  Initializes a new instance of the class with a given surrogate selector and streaming context.

  The to use. Can be null.
  The source and destination for the serialized data.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Serialization.Formatters.FormatterAssemblyStyle To be added. To be added.

  Gets or sets the behavior of the deserializer with regards to finding and loading assemblies.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Serialization.SerializationBinder To be added. To be added.

  Gets or sets an object of type that controls the binding of a serialized object to a type.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Serialization.StreamingContext To be added.

  The provides an enumeration that describes the source and the destination for a given serialized stream, as well as a way for serialization to retain that context and an additional caller-defined context.

  Gets or sets the for this formatter.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object ``

  For successful deserialization, the current position in the stream must be at the beginning of the object graph.

  Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

  Deserializes the specified stream into an object graph.

  The top (root) of the object graph.

  The stream from which to deserialize the object graph.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` ``

  Headers are used only for specific remoting applications.

  In order for deserialization to succeed the current position in the stream must be at the beginning of the object graph.

  Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

  Deserializes the specified stream into an object graph. The provided handles any headers in that stream.

  The deserialized object or the top object (root) of the object graph.

  The stream from which to deserialize the object graph. The that handles any headers in the . Can be null.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` `` ``

  Details about the caller object are not sent to the remote object during the method call. Instead, these details are obtained from the original method call that is passed to the current method in the parameter.

  In order for deserialization to succeed the current position in the stream must be at the beginning of the object graph.

  Deserializes a response to a remote method call from the provided .

  The deserialized response to the remote method call.

  The stream from which to deserialize the object graph. The that handles any headers in the . Can be null. The that contains details about where the call came from.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Serialization.Formatters.TypeFilterLevel To be added.

  Supported values are and (the default). For details about deserialization levels, see [<topic://cpconAutomaticDeserializationInNETRemoting>].

  Gets or sets the of automatic deserialization the performs.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added

  Serializes the object, or graph of objects with the specified top (root), to the given stream.

  The stream to which the graph is to be serialized. The object at the root of the graph to serialize.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  The serialization process includes the information supplied in the parameter at the front of the serialized stream.

  Headers are used only for specific remoting applications.

  Serializes the object, or graph of objects with the specified top (root), to the given stream attaching the provided headers.

  The stream to which the object is to be serialized. The object at the root of the graph to serialize. Remoting headers to include in the serialization. Can be null.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Serialization.ISurrogateSelector To be added.

  The surrogate selector is used by to generate instances for objects that derive from .

  Gets or sets a that controls type substitution during serialization and deserialization.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Serialization.Formatters.FormatterTypeStyle To be added. To be added.

  Gets or sets the format in which type descriptions are laid out in the serialized stream.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Object `` ``

  Headers are used only for specific remoting applications.

  This method uses to prevent it from being called from untrusted code; only the immediate caller is required to have permission. Do not use this method if your code can be called from partially trusted code. In partially trusted scenarios, use instead. In full trust scenarios, provides better performance than .

  For successful deserialization, the current position in the stream must be at the beginning of the object graph.

  Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

  Deserializes the specified stream into an object graph. The provided handles any headers in that stream.

  The deserialized object or the top object (root) of the object graph.

  The stream from which to deserialize the object graph. The that handles any headers in the . Can be null.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Object `` `` ``

  Details about the caller object are not sent to the remote object during the method call. Instead, these details are obtained from the original method call that is passed to the current method in the parameter.

  This method uses to prevent it from being called from untrusted code; only the immediate caller is required to have permission. Do not use this method if your code can be called from partially trusted code. In partially trusted scenarios, use instead. In full trust scenarios, provides better performance than .

  For successful deserialization, the current position in the stream must be at the beginning of the object graph.

  Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

  Deserializes a response to a remote method call from the provided .

  The deserialized response to the remote method call.

  The stream from which to deserialize the object graph. The that handles any headers in the . Can be null. The that contains details about where the call came from.