共用方式為


IDesignerSerializationProvider.GetSerializer 方法

定義

使用指定的屬性 (Attribute),取得序列化工具。

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

適用於