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. 遠端代理處理衍生自遠端處理的序列化需求MarshalByRefObjectRemoting surrogates handle remoting serialization requirements of objects that derive from MarshalByRefObject. RemotingSurrogateSelector管理已註冊的代理,以供BinaryFormatterSoapFormatterThe 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然後可以傳送至遠端位置,用來建立 proxy。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. ASecurityException立即呼叫端或衍生的類別沒有基礎結構權限時,會擲回。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.

建構函式

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()

傳回位於物件 Graph 的根 (Root) 的物件。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 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

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

設定位於物件 Graph 的根的物件。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

適用於

另請參閱