Search Results for

    Show / Hide Table of Contents

    Class Value

    A base value type for config data abstract representations, to be serialized with an IConfigProvider. If a Value is null, then that represents just that: a null in whatever serialization is being used. Also contains factory functions for all derived types.

    Inheritance
    System.Object
    Value
    Boolean
    FloatingPoint
    Integer
    List
    Map
    Text
    Inherited Members
    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.Data
    Assembly: IPA.Loader.dll
    Syntax
    public abstract class Value

    Methods

    | Improve this Doc View Source

    Bool(Boolean)

    Creates a new Boolean wrapping a System.Boolean.

    Declaration
    public static Boolean Bool(bool val)
    Parameters
    Type Name Description
    System.Boolean val

    the value to wrap

    Returns
    Type Description
    Boolean

    a Boolean wrapping val

    See Also
    From(Boolean)
    | Improve this Doc View Source

    Float(Decimal)

    Creates a new FloatingPoint wrapping a System.Decimal.

    Declaration
    public static FloatingPoint Float(decimal val)
    Parameters
    Type Name Description
    System.Decimal val

    the value to wrap

    Returns
    Type Description
    FloatingPoint

    a FloatingPoint wrapping val

    See Also
    From(Decimal)
    | Improve this Doc View Source

    From(Boolean)

    Creates a new Value wrapping a System.Boolean.

    Declaration
    public static Boolean From(bool val)
    Parameters
    Type Name Description
    System.Boolean val

    the value to wrap

    Returns
    Type Description
    Boolean

    a Boolean wrapping val

    See Also
    Bool(Boolean)
    | Improve this Doc View Source

    From(IDictionary<String, Value>)

    Creates a new Map holding the content of an System.Collections.Generic.IDictionary<TKey, TValue> of System.String to Value.

    Declaration
    public static Map From(IDictionary<string, Value> vals)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, Value> vals

    the dictionary of Values to initialize the Map wtih

    Returns
    Type Description
    Map

    a Map containing the content of vals

    See Also
    Map()
    From(IEnumerable<KeyValuePair<String, Value>>)
    | Improve this Doc View Source

    From(IEnumerable<Value>)

    Creates a new List holding the content of an System.Collections.Generic.IEnumerable<T> of Value.

    Declaration
    public static List From(IEnumerable<Value> vals)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Value> vals

    the Values to initialize the List with

    Returns
    Type Description
    List

    a List containing the content of vals

    See Also
    List()
    | Improve this Doc View Source

    From(IEnumerable<KeyValuePair<String, Value>>)

    Creates a new Map holding the content of an System.Collections.Generic.IEnumerable<T> of System.Collections.Generic.KeyValuePair<TKey, TValue> of System.String to Value.

    Declaration
    public static Map From(IEnumerable<KeyValuePair<string, Value>> vals)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, Value>> vals

    the enumerable of System.Collections.Generic.KeyValuePair<TKey, TValue> of name to Value

    Returns
    Type Description
    Map

    a Map containing the content of vals

    See Also
    Map()
    From(IDictionary<String, Value>)
    | Improve this Doc View Source

    From(Decimal)

    Creates a new Value wrapping a System.Double.

    Declaration
    public static FloatingPoint From(decimal val)
    Parameters
    Type Name Description
    System.Decimal val

    the value to wrap

    Returns
    Type Description
    FloatingPoint

    a FloatingPoint wrapping val

    See Also
    Float(Decimal)
    | Improve this Doc View Source

    From(Int64)

    Creates a new Value wrapping a System.Int64.

    Declaration
    public static Integer From(long val)
    Parameters
    Type Name Description
    System.Int64 val

    the value to wrap

    Returns
    Type Description
    Integer

    a Integer wrapping val

    See Also
    Integer(Int64)
    | Improve this Doc View Source

    From(String)

    Creates a new Value representing a System.String.

    Declaration
    public static Text From(string val)
    Parameters
    Type Name Description
    System.String val

    the value to wrap

    Returns
    Type Description
    Text

    a Text wrapping val

    See Also
    Text(String)
    | Improve this Doc View Source

    Integer(Int64)

    Creates a new Integer wrapping a System.Int64.

    Declaration
    public static Integer Integer(long val)
    Parameters
    Type Name Description
    System.Int64 val

    the value to wrap

    Returns
    Type Description
    Integer

    a Integer wrapping val

    See Also
    From(Int64)
    | Improve this Doc View Source

    List()

    Creates an empty List().

    Declaration
    public static List List()
    Returns
    Type Description
    List

    an empty List()

    See Also
    From(IEnumerable<Value>)
    | Improve this Doc View Source

    Map()

    Creates an empty Map().

    Declaration
    public static Map Map()
    Returns
    Type Description
    Map

    an empty Map()

    See Also
    From(IDictionary<String, Value>)
    From(IEnumerable<KeyValuePair<String, Value>>)
    | Improve this Doc View Source

    Null()

    Creates a Null Value.

    Declaration
    public static Value Null()
    Returns
    Type Description
    Value null
    | Improve this Doc View Source

    Text(String)

    Creates a new Text object wrapping a System.String.

    Declaration
    public static Text Text(string val)
    Parameters
    Type Name Description
    System.String val

    the value to wrap

    Returns
    Type Description
    Text

    a Text wrapping val

    See Also
    From(String)
    | Improve this Doc View Source

    ToString()

    Converts this Value into a human-readable format.

    Declaration
    public abstract override string ToString()
    Returns
    Type Description
    System.String

    a human-readable string containing the value provided

    Overrides
    System.Object.ToString()

    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