共用方式為


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 會採用物件類型,而不是物件值。

另請參閱

適用於