ObjectManager(ISurrogateSelector, StreamingContext) 构造函数

定义

初始化 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);
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

要使用的代理项选择器。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

流上下文。The streaming context. StreamingContext 未被 ObjectManager 使用,但却作为参数传递到任何实现 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.

适用于