CodeDomSerializerBase.GetSerializer 方法

定义

定位给定对象值或类型的序列化程序。

重载

GetSerializer(IDesignerSerializationManager, Object)

定位给定对象值的序列化程序。

GetSerializer(IDesignerSerializationManager, Type)

定位给定类型的序列化程序。

GetSerializer(IDesignerSerializationManager, Object)

定位给定对象值的序列化程序。

protected:
 System::ComponentModel::Design::Serialization::CodeDomSerializer ^ GetSerializer(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::Object ^ value);
protected System.ComponentModel.Design.Serialization.CodeDomSerializer GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
protected System.ComponentModel.Design.Serialization.CodeDomSerializer? GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object? value);
member this.GetSerializer : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.ComponentModel.Design.Serialization.CodeDomSerializer
Protected Function GetSerializer (manager As IDesignerSerializationManager, value As Object) As CodeDomSerializer

参数

value
Object

指定要检索的序列化程序的对象。

返回

适合于 valueCodeDomSerializer

例外

managervaluenull

注解

方法是 GetSerializer 方法的 IDesignerSerializationManager.GetSerializer 扩展。 方法 IDesignerSerializationManager.GetSerializer 采用对象类型,而不是对象值。 如果外部方通过 TypeDescriptor重写了特定对象的元数据,则该方法将看不到 IDesignerSerializationManager.GetSerializer 该元数据替代,该方法仅采用 类型。 方法 GetSerializer 检查值的元数据和值的类型。 如果两者不同, GetSerializer 将查看值上是否存在自定义设计器序列化程序属性。 如果是这样, GetSerializer 将尝试使用它。 否则,它将遵循 IDesignerSerializationManager.GetSerializer

另请参阅

适用于

GetSerializer(IDesignerSerializationManager, Type)

定位给定类型的序列化程序。

protected:
 System::ComponentModel::Design::Serialization::CodeDomSerializer ^ GetSerializer(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, Type ^ valueType);
protected System.ComponentModel.Design.Serialization.CodeDomSerializer GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, Type valueType);
protected System.ComponentModel.Design.Serialization.CodeDomSerializer? GetSerializer (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, Type valueType);
member this.GetSerializer : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * Type -> System.ComponentModel.Design.Serialization.CodeDomSerializer
Protected Function GetSerializer (manager As IDesignerSerializationManager, valueType As Type) As CodeDomSerializer

参数

valueType
Type

指定要检索的序列化程序的 Type

返回

适合于 valueTypeCodeDomSerializer

例外

managervalueTypenull

注解

方法是 GetSerializer 方法的 IDesignerSerializationManager.GetSerializer 扩展。 方法 IDesignerSerializationManager.GetSerializer 采用对象类型,而不是对象值。

另请参阅

适用于