docs.unity3d.com
    Show / Hide Table of Contents

    Struct NamedValue

    A combination of a name and a value assignment for it.

    Namespace: UnityEngine.InputSystem.Utilities
    Syntax
    public struct NamedValue : IEquatable<NamedValue>

    Fields

    Separator

    Declaration
    public const string Separator = ","
    Field Value
    Type Description
    String

    Properties

    name

    Name of the parameter.

    Declaration
    public string name { readonly get; set; }
    Property Value
    Type Description
    String

    type

    Declaration
    public readonly TypeCode type { get; }
    Property Value
    Type Description
    TypeCode

    value

    Value of the parameter.

    Declaration
    public PrimitiveValue value { readonly get; set; }
    Property Value
    Type Description
    PrimitiveValue

    Methods

    ApplyAllToObject<TParameterList>(Object, TParameterList)

    Declaration
    public static void ApplyAllToObject<TParameterList>(object instance, TParameterList parameters)
        where TParameterList : IEnumerable<NamedValue>
    Parameters
    Type Name Description
    Object instance
    TParameterList parameters
    Type Parameters
    Name Description
    TParameterList

    ApplyToObject(Object)

    Declaration
    public void ApplyToObject(object instance)
    Parameters
    Type Name Description
    Object instance

    ConvertTo(TypeCode)

    Declaration
    public NamedValue ConvertTo(TypeCode type)
    Parameters
    Type Name Description
    TypeCode type
    Returns
    Type Description
    NamedValue

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(NamedValue)

    Declaration
    public bool Equals(NamedValue other)
    Parameters
    Type Name Description
    NamedValue other
    Returns
    Type Description
    Boolean
    Implements
    IEquatable<T>.Equals(T)

    From<TValue>(String, TValue)

    Declaration
    public static NamedValue From<TValue>(string name, TValue value)
        where TValue : struct
    Parameters
    Type Name Description
    String name
    TValue value
    Returns
    Type Description
    NamedValue
    Type Parameters
    Name Description
    TValue

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    Parse(String)

    Declaration
    public static NamedValue Parse(string str)
    Parameters
    Type Name Description
    String str
    Returns
    Type Description
    NamedValue

    ParseMultiple(String)

    Declaration
    public static NamedValue[] ParseMultiple(string parameterString)
    Parameters
    Type Name Description
    String parameterString
    Returns
    Type Description
    NamedValue[]

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    Operators

    Equality(NamedValue, NamedValue)

    Declaration
    public static bool operator ==(NamedValue left, NamedValue right)
    Parameters
    Type Name Description
    NamedValue left
    NamedValue right
    Returns
    Type Description
    Boolean

    Inequality(NamedValue, NamedValue)

    Declaration
    public static bool operator !=(NamedValue left, NamedValue right)
    Parameters
    Type Name Description
    NamedValue left
    NamedValue right
    Returns
    Type Description
    Boolean
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023