Class BaseTypeConverterFactory
Definition
Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll
Allows implicit conversion from a type's ancestor to the destination type, if the source type does not have its own explicitly-defined conversion but a base type does.
Inheritance
Object ⇦ BaseTypeConverterFactory
Implements
IValueConverterFactory
Members
Constructors
| Name | Description |
|---|---|
| BaseTypeConverterFactory(IValueConverterFactory) | Allows implicit conversion from a type's ancestor to the destination type, if the source type does not have its own explicitly-defined conversion but a base type does. |
Methods
| Name | Description |
|---|---|
| TryGetConverter<TSource, TDestination>(IValueConverter<TSource, TDestination>) | Attempts to obtain a converter from a given source type to a given destination type. |
Details
Constructors
BaseTypeConverterFactory(IValueConverterFactory)
Allows implicit conversion from a type's ancestor to the destination type, if the source type does not have its own explicitly-defined conversion but a base type does.
public BaseTypeConverterFactory(StardewUI.Framework.Converters.IValueConverterFactory innerFactory);
Parameters
innerFactory IValueConverterFactory
The converter factory to handle conversion of ancestor types.
Methods
TryGetConverter<TSource, TDestination>(IValueConverter<TSource, TDestination>)
Attempts to obtain a converter from a given source type to a given destination type.
public bool TryGetConverter<TSource, TDestination>(out IValueConverter<TSource, TDestination> converter);
Parameters
converter IValueConverter<TSource, TDestination>
If the method returns true, holds the converter that converts between the specified types; otherwise null.
Returns
true if the conversion is supported, otherwise false.