RemotingSurrogateSelector Class

Definition

Selects the remoting surrogate that can be used to serialize an object that derives from a MarshalByRefObject.

public ref class RemotingSurrogateSelector : System::Runtime::Serialization::ISurrogateSelector
public class RemotingSurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
[System.Runtime.InteropServices.ComVisible(true)]
public class RemotingSurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
public class RemotingSurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
type RemotingSurrogateSelector = class
    interface ISurrogateSelector
[<System.Runtime.InteropServices.ComVisible(true)>]
type RemotingSurrogateSelector = class
    interface ISurrogateSelector
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Security.SecurityCritical>]
type RemotingSurrogateSelector = class
    interface ISurrogateSelector
Public Class RemotingSurrogateSelector
Implements ISurrogateSelector
Inheritance
RemotingSurrogateSelector
Attributes
Implements

Remarks

A surrogate is an object that can handle the serialization requirements of an object. Remoting surrogates handle remoting serialization requirements of objects that derive from MarshalByRefObject. The RemotingSurrogateSelector manages registered surrogates for use by the BinaryFormatter and SoapFormatter.

During serialization for remoting purposes of a MarshalByRefObject, the remoting surrogate creates an ObjRef that contains all the relevant information required to activate and communicate with the remote object. The newly created ObjRef can then be sent to a remote location and used to create a proxy.

Note

This class makes a link demand and an inheritance demand at the class level. A SecurityException is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see Link Demands and Inheritance Demands.

Constructors

RemotingSurrogateSelector()

Initializes a new instance of the RemotingSurrogateSelector class.

Properties

Filter

Gets or sets the MessageSurrogateFilter delegate for the current instance of the RemotingSurrogateSelector.

Methods

ChainSelector(ISurrogateSelector)

Adds the specified ISurrogateSelector to the surrogate selector chain.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetNextSelector()

Returns the next ISurrogateSelector in the chain of surrogate selectors.

GetRootObject()

Returns the object at the root of the object graph.

GetSurrogate(Type, StreamingContext, ISurrogateSelector)

Returns the appropriate surrogate for the given type in the given context.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetRootObject(Object)

Sets the object at the root of the object graph.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
UseSoapFormat()

Sets up the current surrogate selector to use the SOAP format.

Applies to

See also