IValueSerializerContext 介面

定義

定義提供給 ValueSerializer 的內容。 內容可以用來啟用特殊的序列化情況或不同的序列化模式。

public interface class IValueSerializerContext : IServiceProvider, System::ComponentModel::ITypeDescriptorContext
public interface IValueSerializerContext : IServiceProvider, System.ComponentModel.ITypeDescriptorContext
type IValueSerializerContext = interface
    interface ITypeDescriptorContext
    interface IServiceProvider
Public Interface IValueSerializerContext
Implements IServiceProvider, ITypeDescriptorContext
實作

備註

IValueSerializerContext介面是一種特殊形式的ITypeDescriptorContext內容,而且會做為值串行化程式方法的其中一個輸入參數 / Convert*StringCanConvert*String,與 用於的內容Convert*CanConvert*TypeConverter / 相同。ITypeDescriptorContext

在 WPF 中實ValueSerializer作 的公用類型,因此可在 和 System.Windows.Media.Converters 命名空間中找到System.Windows.Converters用於IValueSerializerContext內容。

在舊版的 .NET Framework 中,這個介面存在於 WPF 特定的元件 WindowsBase 中。 在 .NET Framework 4 中,IValueSerializerContext位於 System.Xaml 元件中。 如需詳細資訊,請參閱 Types Migrated from WPF to System.Xaml

屬性

Container

取得表示這個 TypeDescriptor 要求的容器。

(繼承來源 ITypeDescriptorContext)
Instance

取得與這個型別描述項要求關聯的物件。

(繼承來源 ITypeDescriptorContext)
PropertyDescriptor

取得與指定內容項目關聯的 PropertyDescriptor

(繼承來源 ITypeDescriptorContext)

方法

GetService(Type)

取得指定類型的服務物件。

(繼承來源 IServiceProvider)
GetValueSerializerFor(PropertyDescriptor)

取得指定屬性描述元的 ValueSerializer

GetValueSerializerFor(Type)

取得與指定類型相關聯的 ValueSerializer

OnComponentChanged()

引發 ComponentChanged 事件。

(繼承來源 ITypeDescriptorContext)
OnComponentChanging()

引發 ComponentChanging 事件。

(繼承來源 ITypeDescriptorContext)

適用於

另請參閱