Class IdentityValueConverterFactory
Definition
Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll
Factory that automatically implements identity conversions, where the source and destination type are the same.
Inheritance
Object ⇦ IdentityValueConverterFactory
Implements
IValueConverterFactory
Remarks
Used for most model and asset bindings.
Members
Constructors
Name | Description |
---|---|
IdentityValueConverterFactory() |
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
IdentityValueConverterFactory()
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
.