IDesignerSerializationProvider.GetSerializer 方法

定义

获取使用指定特性的序列化程序。

public:
 System::Object ^ GetSerializer(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::Object ^ currentSerializer, Type ^ objectType, Type ^ serializerType);
public object GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object currentSerializer, Type objectType, Type serializerType);
public object? GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object currentSerializer, Type objectType, Type serializerType);
public object? GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object? currentSerializer, Type? objectType, Type serializerType);
abstract member GetSerializer : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj * Type * Type -> obj
Public Function GetSerializer (manager As IDesignerSerializationManager, currentSerializer As Object, objectType As Type, serializerType As Type) As Object

参数

manager
IDesignerSerializationManager

请求序列化程序的序列化管理器。

currentSerializer
Object

指定类型的当前序列化程序的实例。 如果不存在指定类型的序列化程序,则这可能为 null

objectType
Type

要序列化的对象的数据类型。

serializerType
Type

要创建的序列化程序的数据类型。

返回

所请求类型的序列化程序的实例,如果不能满足该请求则为 null

注解

序列化管理器在尝试查找对象类型的序列化程序时调用此方法。 如果此序列化提供程序可以提供正确类型的序列化程序,则此提供程序将返回它。 否则,将返回 null

适用于