LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Class Configuration

    Configuration options for LdClient.

    Inheritance
    object
    Configuration
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Client
    Assembly: LaunchDarkly.ClientSdk.dll
    Syntax
    public sealed class Configuration
    Remarks

    Instances of Configuration are immutable once created. They can be created with the factory method Default(string, AutoEnvAttributes), or using a builder pattern with ImmutableArray<T>.Builder or Builder(Configuration).

    Fields

    | Edit this page View Source

    DefaultBackgroundPollInterval

    Default value for BackgroundPollInterval(TimeSpan) and BackgroundPollInterval(TimeSpan).

    Declaration
    public static readonly TimeSpan DefaultBackgroundPollInterval
    Field Value
    Type Description
    TimeSpan
    | Edit this page View Source

    MinimumBackgroundPollInterval

    Minimum value for BackgroundPollInterval(TimeSpan) and BackgroundPollInterval(TimeSpan).

    Declaration
    public static readonly TimeSpan MinimumBackgroundPollInterval
    Field Value
    Type Description
    TimeSpan

    Properties

    | Edit this page View Source

    ApplicationInfo

    ApplicationInfo configuration which contains info about the application the SDK is running in.

    Declaration
    public ApplicationInfoBuilder ApplicationInfo { get; }
    Property Value
    Type Description
    ApplicationInfoBuilder
    | Edit this page View Source

    AutoEnvAttributes

    True if Auto Environment Attributes functionality is enabled. When enabled, the SDK will automatically provide data about the environment where the application is running.

    Declaration
    public bool AutoEnvAttributes { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    DataSource

    A factory object that creates an implementation of IDataSource, which will receive feature flag data.

    Declaration
    public IComponentConfigurer<IDataSource> DataSource { get; }
    Property Value
    Type Description
    IComponentConfigurer<IDataSource>
    See Also
    DataSource(IComponentConfigurer<IDataSource>)
    | Edit this page View Source

    DiagnosticOptOut

    True if diagnostic events have been disabled.

    Declaration
    public bool DiagnosticOptOut { get; }
    Property Value
    Type Description
    bool
    See Also
    DiagnosticOptOut(bool)
    | Edit this page View Source

    EnableBackgroundUpdating

    Whether to enable feature flag updates when the application is running in the background.

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

    This is only relevant on mobile platforms.

    See Also
    EnableBackgroundUpdating(bool)
    | Edit this page View Source

    EvaluationReasons

    True if LaunchDarkly should provide additional information about how flag values were calculated.

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

    The additional information will then be available through the client's "detail" methods such as BoolVariationDetail(string, bool). Since this increases the size of network requests, such information is not sent unless you set this option to true.

    See Also
    EvaluationReasons(bool)
    | Edit this page View Source

    Events

    A factory object that creates an implementation of IEventProcessor, responsible for sending analytics events.

    Declaration
    public IComponentConfigurer<IEventProcessor> Events { get; }
    Property Value
    Type Description
    IComponentConfigurer<IEventProcessor>
    See Also
    Events(IComponentConfigurer<IEventProcessor>)
    | Edit this page View Source

    GenerateAnonymousKeys

    True if the SDK should provide unique keys for anonymous contexts.

    Declaration
    public bool GenerateAnonymousKeys { get; }
    Property Value
    Type Description
    bool
    See Also
    GenerateAnonymousKeys(bool)
    | Edit this page View Source

    HttpConfigurationBuilder

    HTTP configuration properties for the SDK.

    Declaration
    public HttpConfigurationBuilder HttpConfigurationBuilder { get; }
    Property Value
    Type Description
    HttpConfigurationBuilder
    See Also
    Http(HttpConfigurationBuilder)
    | Edit this page View Source

    LoggingConfigurationBuilder

    Logging configuration properties for the SDK.

    Declaration
    public LoggingConfigurationBuilder LoggingConfigurationBuilder { get; }
    Property Value
    Type Description
    LoggingConfigurationBuilder
    See Also
    LaunchDarkly.Logging
    | Edit this page View Source

    MobileKey

    The key for your LaunchDarkly environment.

    Declaration
    public string MobileKey { get; }
    Property Value
    Type Description
    string
    Remarks

    This should be the "mobile key" field for the environment on your LaunchDarkly dashboard.

    | Edit this page View Source

    Offline

    Whether or not this client is offline. If true, no calls to LaunchDarkly will be made.

    Declaration
    public bool Offline { get; }
    Property Value
    Type Description
    bool
    See Also
    Offline(bool)
    | Edit this page View Source

    PersistenceConfigurationBuilder

    Persistent storage configuration properties for the SDK.

    Declaration
    public PersistenceConfigurationBuilder PersistenceConfigurationBuilder { get; }
    Property Value
    Type Description
    PersistenceConfigurationBuilder
    See Also
    Persistence(PersistenceConfigurationBuilder)
    | Edit this page View Source

    ServiceEndpoints

    Defines the base service URIs used by SDK components.

    Declaration
    public ServiceEndpoints ServiceEndpoints { get; }
    Property Value
    Type Description
    ServiceEndpoints
    See Also
    ServiceEndpoints(ServiceEndpointsBuilder)

    Methods

    | Edit this page View Source

    Builder(Configuration)

    Creates a ConfigurationBuilder starting with the properties of an existing Configuration.

    Declaration
    public static ConfigurationBuilder Builder(Configuration fromConfiguration)
    Parameters
    Type Name Description
    Configuration fromConfiguration

    the configuration to copy

    Returns
    Type Description
    ConfigurationBuilder

    a builder object

    | Edit this page View Source

    Builder(string, AutoEnvAttributes)

    Creates a ConfigurationBuilder for constructing a configuration object using a fluent syntax.

    Declaration
    public static ConfigurationBuilder Builder(string mobileKey, ConfigurationBuilder.AutoEnvAttributes autoEnvAttributes)
    Parameters
    Type Name Description
    string mobileKey

    the mobile SDK key for your LaunchDarkly environment

    ConfigurationBuilder.AutoEnvAttributes autoEnvAttributes

    Enable / disable Auto Environment Attributes functionality. When enabled, the SDK will automatically provide data about the environment where the application is running. This data makes it simpler to target your mobile customers based on application name or version, or on device characteristics including manufacturer, model, operating system, locale, and so on. We recommend enabling this when you configure the SDK. See our documentation for more details.

    Returns
    Type Description
    ConfigurationBuilder

    a builder object

    Remarks

    This is the only method for building a Configuration if you are setting properties besides the MobileKey. The ConfigurationBuilder has methods for setting any number of properties, after which you call Build() to get the resulting Configuration instance.

    Examples
    var config = Configuration.Builder("my-sdk-key")
        .EventFlushInterval(TimeSpan.FromSeconds(90))
        .StartWaitTime(TimeSpan.FromSeconds(5))
        .Build();
    | Edit this page View Source

    Default(string, AutoEnvAttributes)

    Creates a configuration with all parameters set to the default.

    Declaration
    public static Configuration Default(string mobileKey, ConfigurationBuilder.AutoEnvAttributes autoEnvAttributes)
    Parameters
    Type Name Description
    string mobileKey

    the SDK key for your LaunchDarkly environment

    ConfigurationBuilder.AutoEnvAttributes autoEnvAttributes

    Enable / disable Auto Environment Attributes functionality. When enabled, the SDK will automatically provide data about the environment where the application is running. This data makes it simpler to target your mobile customers based on application name or version, or on device characteristics including manufacturer, model, operating system, locale, and so on. We recommend enabling this when you configure the SDK. See our documentation for more details.

    Returns
    Type Description
    Configuration

    a Configuration instance

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