Search Results for

    Show / Hide Table of Contents

    Class NullableConverter<T>

    A converter for a System.Nullable<T>.

    Inheritance
    System.Object
    ValueConverter<System.Nullable<T>>
    NullableConverter<T>
    NullableConverter<T, TConverter>
    Implements
    IValueConverter
    Inherited Members
    ValueConverter<Nullable<T>>.IValueConverter.ToValue(Object, Object)
    ValueConverter<Nullable<T>>.IValueConverter.FromValue(Value, Object)
    ValueConverter<Nullable<T>>.IValueConverter.Type
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: IPA.Config.Stores.Converters
    Assembly: IPA.Loader.dll
    Syntax
    public class NullableConverter<T> : ValueConverter<T?>, IValueConverter where T : struct
    Type Parameters
    Name Description
    T

    the underlying type of the System.Nullable<T>

    Constructors

    | Improve this Doc View Source

    NullableConverter()

    Creates a converter with the default converter for the base type. Equivalent to

    new NullableConverter(Converter<T>.Default)
    Declaration
    public NullableConverter()
    See Also
    NullableConverter(ValueConverter<T>)
    Default
    | Improve this Doc View Source

    NullableConverter(ValueConverter<T>)

    Creates a converter with the given underlying ValueConverter<T>.

    Declaration
    public NullableConverter(ValueConverter<T> underlying)
    Parameters
    Type Name Description
    ValueConverter<T> underlying

    the undlerlying ValueConverter<T> to use

    Methods

    | Improve this Doc View Source

    FromValue(Value, Object)

    Converts a Value tree to a value.

    Declaration
    public override T? FromValue(Value value, object parent)
    Parameters
    Type Name Description
    Value value

    the Value tree to convert

    System.Object parent

    the object which will own the created object

    Returns
    Type Description
    System.Nullable<T>

    the object represented by value

    Overrides
    IPA.Config.Stores.ValueConverter<System.Nullable<T>>.FromValue(IPA.Config.Data.Value, System.Object)
    | Improve this Doc View Source

    ToValue(Nullable<T>, Object)

    Converts a nullable T to a Value tree.

    Declaration
    public override Value ToValue(T? obj, object parent)
    Parameters
    Type Name Description
    System.Nullable<T> obj

    the value to serialize

    System.Object parent

    the object which owns obj

    Returns
    Type Description
    Value

    a Value tree representing obj.

    Overrides
    IPA.Config.Stores.ValueConverter<System.Nullable<T>>.ToValue(System.Nullable<T>, System.Object)

    Implements

    IValueConverter

    Extension Methods

    ReflectionUtil.SetField<T, U>(T, String, U)
    ReflectionUtil.GetField<U, T>(T, String)
    ReflectionUtil.SetProperty<T, U>(T, String, U)
    ReflectionUtil.GetProperty<U, T>(T, String)
    ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX