LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Struct UserAttribute

    Represents a built-in or custom attribute name supported by User.

    Implements
    IEquatable<UserAttribute>
    Inherited Members
    object.GetType()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: LaunchDarkly.Sdk
    Assembly: LaunchDarkly.CommonSdk.dll
    Syntax
    public struct UserAttribute : IEquatable<UserAttribute>
    Remarks

    Application code rarely needs to use this type; it is used internally by the SDK for efficiency in flag evaluations. It can also be used as a reference for the constant names of built-in attributes such as Email. However, in the newer Context model, there are very few reserved attribute names, so the equivalent of Email would simply be a custom attribute called "email".

    For a fuller description of user attributes and how they can be referenced in feature flag rules, read the reference guides on Setting user attributes and Targeting users.

    Fields

    Anonymous

    Represents the anonymous attribute.

    Declaration
    public static readonly UserAttribute Anonymous
    Field Value
    Type Description
    UserAttribute

    Avatar

    Represents the avatar URL attribute.

    Declaration
    public static readonly UserAttribute Avatar
    Field Value
    Type Description
    UserAttribute

    Country

    Represents the country attribute.

    Declaration
    public static readonly UserAttribute Country
    Field Value
    Type Description
    UserAttribute

    Email

    Represents the user email attribute.

    Declaration
    public static readonly UserAttribute Email
    Field Value
    Type Description
    UserAttribute

    FirstName

    Represents the first name attribute.

    Declaration
    public static readonly UserAttribute FirstName
    Field Value
    Type Description
    UserAttribute

    IPAddress

    Represents the IP address attribute.

    Declaration
    public static readonly UserAttribute IPAddress
    Field Value
    Type Description
    UserAttribute

    Key

    Represents the user key attribute.

    Declaration
    public static readonly UserAttribute Key
    Field Value
    Type Description
    UserAttribute

    LastName

    Represents the last name attribute.

    Declaration
    public static readonly UserAttribute LastName
    Field Value
    Type Description
    UserAttribute

    Name

    Represents the full name attribute.

    Declaration
    public static readonly UserAttribute Name
    Field Value
    Type Description
    UserAttribute

    Properties

    AttributeName

    The case-sensitive attribute name.

    Declaration
    public string AttributeName { get; }
    Property Value
    Type Description
    string

    BuiltIn

    True for a built-in attribute or false for a custom attribute.

    Declaration
    public bool BuiltIn { get; }
    Property Value
    Type Description
    bool

    Methods

    Equals(UserAttribute)

    Declaration
    public bool Equals(UserAttribute a)
    Parameters
    Type Name Description
    UserAttribute a
    Returns
    Type Description
    bool

    Equals(object)

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

    ForName(string)

    Returns a UserAttribute instance for the specified attribute name.

    Declaration
    public static UserAttribute ForName(string name)
    Parameters
    Type Name Description
    string name

    the attribute name

    Returns
    Type Description
    UserAttribute

    a UserAttribute

    GetHashCode()

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

    ToString()

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

    Operators

    operator ==(UserAttribute, UserAttribute)

    Declaration
    public static bool operator ==(UserAttribute a, UserAttribute b)
    Parameters
    Type Name Description
    UserAttribute a
    UserAttribute b
    Returns
    Type Description
    bool

    operator !=(UserAttribute, UserAttribute)

    Declaration
    public static bool operator !=(UserAttribute a, UserAttribute b)
    Parameters
    Type Name Description
    UserAttribute a
    UserAttribute b
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>

    See Also

    User
    In this article
    Back to top Generated by DocFX