Formatter.SurrogateSelector 属性

当在派生类中重写时,获取或设置与当前格式化程序一起使用的 ISurrogateSelector

此属性不符合 CLS。 

**命名空间:**System.Runtime.Serialization
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public MustOverride Property SurrogateSelector As ISurrogateSelector
用法
Dim instance As Formatter
Dim value As ISurrogateSelector

value = instance.SurrogateSelector

instance.SurrogateSelector = value
public abstract ISurrogateSelector SurrogateSelector { get; set; }
public:
virtual property ISurrogateSelector^ SurrogateSelector {
    ISurrogateSelector^ get () abstract;
    void set (ISurrogateSelector^ value) abstract;
}
/** @property */
public abstract ISurrogateSelector get_SurrogateSelector ()

/** @property */
public abstract void set_SurrogateSelector (ISurrogateSelector value)
public abstract function get SurrogateSelector () : ISurrogateSelector

public abstract function set SurrogateSelector (value : ISurrogateSelector)

属性值

与当前格式化程序一起使用的 ISurrogateSelector

备注

使用 SurrogateSelector 可查找用于控制特定类型序列化的 ISerializationSurrogate 的实现。

如果一个对象类型具有匹配的代理项,那么即使该类型实现 ISerializable 接口,仍会将序列化和反序列化传递给代理项。

给继承者的说明 必须在派生类中实现此属性。

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Formatter 类
Formatter 成员
System.Runtime.Serialization 命名空间