RemotingSurrogateSelector RemotingSurrogateSelector RemotingSurrogateSelector RemotingSurrogateSelector Class

定义

选择可用于序列化从 MarshalByRefObject 派生的对象的远程处理代理项。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
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
public class RemotingSurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
type RemotingSurrogateSelector = class
    interface ISurrogateSelector
Public Class RemotingSurrogateSelector
Implements ISurrogateSelector
继承
RemotingSurrogateSelectorRemotingSurrogateSelectorRemotingSurrogateSelectorRemotingSurrogateSelector
属性
实现

注解

代理项是一个对象,可处理对象的序列化要求。A surrogate is an object that can handle the serialization requirements of an object. 远程处理代理项处理派生自MarshalByRefObject的对象的远程处理序列化要求。Remoting surrogates handle remoting serialization requirements of objects that derive from MarshalByRefObject. 管理已注册的代理项,供BinaryFormatterSoapFormatter使用。 RemotingSurrogateSelectorThe RemotingSurrogateSelector manages registered surrogates for use by the BinaryFormatter and SoapFormatter.

在为进行远程处理而MarshalByRefObject进行序列化期间,远程处理代理会创建一个ObjRef ,其中包含激活远程对象并与之通信所需的所有相关信息。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. 然后,可以ObjRef将新创建的发送到远程位置,并使用它来创建代理。The newly created ObjRef can then be sent to a remote location and used to create a proxy.

备注

此类在类级别建立链接要求和继承要求。This class makes a link demand and an inheritance demand at the class level. 当直接调用方或派生类没有基础结构权限时,将引发。SecurityExceptionA 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.

构造函数

RemotingSurrogateSelector() RemotingSurrogateSelector() RemotingSurrogateSelector() RemotingSurrogateSelector()

初始化 RemotingSurrogateSelector 类的新实例。Initializes a new instance of the RemotingSurrogateSelector class.

属性

Filter Filter Filter Filter

获取或设置 MessageSurrogateFilter 的当前实例的 RemotingSurrogateSelector 委托。Gets or sets the MessageSurrogateFilter delegate for the current instance of the RemotingSurrogateSelector.

方法

ChainSelector(ISurrogateSelector) ChainSelector(ISurrogateSelector) ChainSelector(ISurrogateSelector) ChainSelector(ISurrogateSelector)

将指定的 ISurrogateSelector 添加到代理项选择器链。Adds the specified ISurrogateSelector to the surrogate selector chain.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetNextSelector() GetNextSelector() GetNextSelector() GetNextSelector()

返回代理项选择器链中的下一个 ISurrogateSelectorReturns the next ISurrogateSelector in the chain of surrogate selectors.

GetRootObject() GetRootObject() GetRootObject() GetRootObject()

返回位于对象图的根处的对象。Returns the object at the root of the object graph.

GetSurrogate(Type, StreamingContext, ISurrogateSelector) GetSurrogate(Type, StreamingContext, ISurrogateSelector) GetSurrogate(Type, StreamingContext, ISurrogateSelector) GetSurrogate(Type, StreamingContext, ISurrogateSelector)

返回给定上下文中给定类型的适当代理项。Returns the appropriate surrogate for the given type in the given context.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
SetRootObject(Object) SetRootObject(Object) SetRootObject(Object) SetRootObject(Object)

设置位于对象图的根处的对象。Sets the object at the root of the object graph.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
UseSoapFormat() UseSoapFormat() UseSoapFormat() UseSoapFormat()

设置当前代理项选择器以使用 SOAP 格式。Sets up the current surrogate selector to use the SOAP format.

安全性

SecurityPermission
用于处理基础结构代码。for operating with infrastructure code. 要求值: InheritanceDemand;权限值:InfrastructureDemand value: InheritanceDemand; Permission Value: Infrastructure

适用于

另请参阅