LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Struct EvaluationReason

    Describes the reason that a flag evaluation produced a particular value.

    Implements
    IJsonSerializable
    Inherited Members
    object.GetType()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: LaunchDarkly.Sdk
    Assembly: LaunchDarkly.CommonSdk.dll
    Syntax
    [JsonConverter(typeof(LdJsonConverters.EvaluationReasonConverter))]
    public struct EvaluationReason : IJsonSerializable
    Remarks

    For converting this type to or from JSON, see LaunchDarkly.Sdk.Json.

    Properties

    BigSegmentsStatus

    Describes the validity of big segment information, if and only if the flag evaluation required querying at least one big segment. Otherwise it returns null.

    Declaration
    public BigSegmentsStatus? BigSegmentsStatus { get; }
    Property Value
    Type Description
    BigSegmentsStatus?
    Remarks

    "Big segments" are a specific kind of user segments. For more information, read the LaunchDarkly documentation about user segments: https://docs.launchdarkly.com/home/users/big-segments

    ErrorKind

    Describes the type of error, if Kind is Error, otherwise null.

    Declaration
    public EvaluationErrorKind? ErrorKind { get; }
    Property Value
    Type Description
    EvaluationErrorKind?

    FallthroughReason

    Returns an EvaluationReason of the kind Fallthrough.

    Declaration
    public static EvaluationReason FallthroughReason { get; }
    Property Value
    Type Description
    EvaluationReason

    InExperiment

    Whether the evaluation was part of an experiment.

    Declaration
    public bool InExperiment { get; }
    Property Value
    Type Description
    bool
    Remarks

    This is true if the evaluation resulted in an experiment rollout and served one of the variations in the experiment. Otherwise it is false.

    Kind

    An enum indicating the general category of the reason.

    Declaration
    public EvaluationReasonKind Kind { get; }
    Property Value
    Type Description
    EvaluationReasonKind

    OffReason

    Returns an EvaluationReason of the kind Off.

    Declaration
    public static EvaluationReason OffReason { get; }
    Property Value
    Type Description
    EvaluationReason

    PrerequisiteKey

    The key of the prerequisite flag that failed, if Kind is PrerequisiteFailed, otherwise null.

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

    RuleId

    The unique identifier of the rule that was matched, or null if this is not a rule match.

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

    RuleIndex

    The index of the rule that was matched (0 for the first), or null if this is not a rule match.

    Declaration
    public int? RuleIndex { get; }
    Property Value
    Type Description
    int?

    TargetMatchReason

    Returns an EvaluationReason of the kind TargetMatch.

    Declaration
    public static EvaluationReason TargetMatchReason { get; }
    Property Value
    Type Description
    EvaluationReason

    Methods

    Equals(object)

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

    ErrorReason(EvaluationErrorKind)

    Returns an EvaluationReason of the kind Error.

    Declaration
    public static EvaluationReason ErrorReason(EvaluationErrorKind errorKind)
    Parameters
    Type Name Description
    EvaluationErrorKind errorKind
    Returns
    Type Description
    EvaluationReason

    a reason descriptor

    GetHashCode()

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

    PrerequisiteFailedReason(string)

    Returns an EvaluationReason of the kind PrerequisiteFailed.

    Declaration
    public static EvaluationReason PrerequisiteFailedReason(string key)
    Parameters
    Type Name Description
    string key

    the key of the prerequisite flag

    Returns
    Type Description
    EvaluationReason

    a reason descriptor

    RuleMatchReason(int, string)

    Returns an EvaluationReason of the kind RuleMatch.

    Declaration
    public static EvaluationReason RuleMatchReason(int ruleIndex, string ruleId)
    Parameters
    Type Name Description
    int ruleIndex

    the rule index

    string ruleId

    the unique rule ID

    Returns
    Type Description
    EvaluationReason

    a reason descriptor

    ToString()

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

    WithBigSegmentsStatus(BigSegmentsStatus?)

    Returns a copy of this EvaluationReason with a specific BigSegmentsStatus value added.

    Declaration
    public EvaluationReason WithBigSegmentsStatus(BigSegmentsStatus? bigSegmentsStatus)
    Parameters
    Type Name Description
    BigSegmentsStatus? bigSegmentsStatus

    the new property value

    Returns
    Type Description
    EvaluationReason

    a reason descriptor

    WithInExperiment(bool)

    Returns a new instance with the InExperiment property set to the specified value, if supported.

    Declaration
    public EvaluationReason WithInExperiment(bool inExperiment)
    Parameters
    Type Name Description
    bool inExperiment

    the desired value for the property

    Returns
    Type Description
    EvaluationReason

    a copy of this instance with the property modified

    Remarks

    Setting InExperiment is only allowed for Fallthrough and RuleMatch. For all other reason kinds, this has no effect.

    Implements

    IJsonSerializable
    In this article
    Back to top Generated by DocFX