ObjectManager(ISurrogateSelector, StreamingContext) ObjectManager(ISurrogateSelector, StreamingContext) ObjectManager(ISurrogateSelector, StreamingContext) ObjectManager(ISurrogateSelector, StreamingContext) Constructor

定義

初始化 ObjectManager 類別的新執行個體。Initializes a new instance of the ObjectManager class.

public:
 ObjectManager(System::Runtime::Serialization::ISurrogateSelector ^ selector, System::Runtime::Serialization::StreamingContext context);
public ObjectManager (System.Runtime.Serialization.ISurrogateSelector selector, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.Serialization.ObjectManager : System.Runtime.Serialization.ISurrogateSelector * System.Runtime.Serialization.StreamingContext -> System.Runtime.Serialization.ObjectManager
Public Sub New (selector As ISurrogateSelector, context As StreamingContext)

參數

selector
ISurrogateSelector ISurrogateSelector ISurrogateSelector ISurrogateSelector

要使用的代理選取器。The surrogate selector to use. ISurrogateSelector 會決定還原序列化指定之型別的物件時所使用的正確代理。The ISurrogateSelector determines the correct surrogate to use when deserializing objects of a given type. 在還原序列化時,代理選取器會從資料流上傳輸的資訊建立新的物件執行個體。At deserialization time, the surrogate selector creates a new instance of the object from the information transmitted on the stream.

context
StreamingContext StreamingContext StreamingContext StreamingContext

資料流內容。The streaming context. ObjectManager 不使用 StreamingContext,但是該內容會當做參數傳入任何實作 ISerializable 或具有 ISerializationSurrogate 的物件。The StreamingContext is not used by ObjectManager, but is passed as a parameter to any objects implementing ISerializable or having a ISerializationSurrogate. 這些物件可以根據還原序列化的資訊來源執行特定的動作。These objects can take specific actions depending on the source of the information to deserialize.

例外狀況

呼叫端沒有必要的使用權限。The caller does not have the required permission.

安全性

SecurityPermission
提供序列化服務。for providing serialization services. 關聯的列舉型別:SerializationFormatterAssociated enumeration: SerializationFormatter.

適用於