IValueSerializerContext Интерфейс
Определение
Определяет контекст, который предоставляется ValueSerializer.Defines a context that is provided to a ValueSerializer. Контекст может использоваться для особых случаев сериализации или различных режимов сериализации.The context can be used to enable special cases of serialization or different modes of serialization.
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*String
/ CanConvert*String
методов сериализатора значений таким же образом, как ITypeDescriptorContext используется для контекста Convert*
/ CanConvert*
для TypeConverter .The IValueSerializerContext interface is a specialized form of the ITypeDescriptorContext context, and is used as one of the input parameters for Convert*String
/ CanConvert*String
methods of a value serializer in the same way as ITypeDescriptorContext is used for context of Convert*
/ CanConvert*
for a TypeConverter.
Открытые типы в WPF, которые реализуют ValueSerializer и, таким же, используют IValueSerializerContext для контекста, находятся в System.Windows.Converters System.Windows.Media.Converters пространствах имен и.Public types in WPF that implement a ValueSerializer and thus use IValueSerializerContext for context are found in the System.Windows.Converters and System.Windows.Media.Converters namespaces.
В предыдущих версиях платформа .NET Framework этот интерфейс существовал в сборке, относящейся к WPF, WindowsBase.In previous versions of the .NET Framework, this interface existed in the WPF-specific assembly WindowsBase. В платформа .NET Framework 4 IValueSerializerContext находится в сборке System. XAML.In .NET Framework 4, IValueSerializerContext is in the System.Xaml assembly. Для получения дополнительной информации см. Types Migrated from WPF to System.Xaml.For more information, see Types Migrated from WPF to System.Xaml.
Свойства
Container |
Возвращает контейнер, представляющий это запрос TypeDescriptor.Gets the container representing this TypeDescriptor request. (Унаследовано от ITypeDescriptorContext) |
Instance |
Возвращает объект, связанный с этим запросом дескриптора типа.Gets the object that is connected with this type descriptor request. (Унаследовано от ITypeDescriptorContext) |
PropertyDescriptor |
Возвращает PropertyDescriptor, связанный с заданным элементом контекста.Gets the PropertyDescriptor that is associated with the given context item. (Унаследовано от ITypeDescriptorContext) |
Методы
GetService(Type) |
Возвращает объект службы указанного типа.Gets the service object of the specified type. (Унаследовано от IServiceProvider) |
GetValueSerializerFor(PropertyDescriptor) |
Получает ValueSerializer для указанного дескриптора свойства.Gets a ValueSerializer for the given property descriptor. |
GetValueSerializerFor(Type) |
Возвращает значение ValueSerializer, связанное с указанным типом.Gets the ValueSerializer associated with the specified type. |
OnComponentChanged() |
Вызывает событие ComponentChanged.Raises the ComponentChanged event. (Унаследовано от ITypeDescriptorContext) |
OnComponentChanging() |
Вызывает событие ComponentChanging.Raises the ComponentChanging event. (Унаследовано от ITypeDescriptorContext) |