LaunchDarkly Dotnet Server SDK
Search Results for

    Show / Hide Table of Contents

    Class FeatureFlagsStateBuilder

    A builder for constructing FeatureFlagsState instances.

    Inheritance
    object
    FeatureFlagsStateBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Server
    Assembly: LaunchDarkly.ServerSdk.dll
    Syntax
    public class FeatureFlagsStateBuilder
    Remarks

    This may be useful in test code. Use Builder(params FlagsStateOption[]) to create a new builder.

    Methods

    | Edit this page View Source

    AddFlag(string, EvaluationDetail<LdValue>)

    Adds the result of a flag evaluation.

    Declaration
    public FeatureFlagsStateBuilder AddFlag(string flagKey, EvaluationDetail<LdValue> result)
    Parameters
    Type Name Description
    string flagKey

    the flag key

    EvaluationDetail<LdValue> result

    the evaluation result

    Returns
    Type Description
    FeatureFlagsStateBuilder
    | Edit this page View Source

    Build()

    Creates a FeatureFlagsState with the properties that have been set on the builder.

    Declaration
    public FeatureFlagsState Build()
    Returns
    Type Description
    FeatureFlagsState

    a state object

    | Edit this page View Source

    Valid(bool)

    Allows the state object to be marked as not valid (i.e. an error occurred, so flags could not be evaluated).

    Declaration
    public FeatureFlagsStateBuilder Valid(bool valid)
    Parameters
    Type Name Description
    bool valid

    true if valid, false if invalid (default is valid)

    Returns
    Type Description
    FeatureFlagsStateBuilder

    the same builder

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX