Skip to content

Class NullableConverterFactory

Definition

Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll

Factory that implements automatic conversion between nullable and non-nullable types.

public class NullableConverterFactory : 
    StardewUI.Framework.Converters.IValueConverterFactory

Inheritance
Object ⇦ NullableConverterFactory

Implements
IValueConverterFactory

Members

Constructors

Name Description
NullableConverterFactory(IValueConverterFactory) Factory that implements automatic conversion between nullable and non-nullable types.

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

NullableConverterFactory(IValueConverterFactory)

Factory that implements automatic conversion between nullable and non-nullable types.

public NullableConverterFactory(StardewUI.Framework.Converters.IValueConverterFactory innerFactory);
Parameters

innerFactory   IValueConverterFactory
The converter factory to handle conversion of the element type(s).


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

Boolean

true if the conversion is supported, otherwise false.