LaunchDarkly Dotnet Server SDK
Search Results for

    Show / Hide Table of Contents

    Class Configuration

    Configuration options for LdClient. This class should normally be constructed with Builder(string).

    Inheritance
    object
    Configuration
    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 Configuration
    Remarks

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

    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

    BigSegments

    A builder for BigSegmentsConfiguration.

    Declaration
    public IComponentConfigurer<BigSegmentsConfiguration> BigSegments { get; }
    Property Value
    Type Description
    IComponentConfigurer<BigSegmentsConfiguration>
    | 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>
    | Edit this page View Source

    DataStore

    A factory object that creates an implementation of IDataStore, to be used for holding feature flags and related data received from LaunchDarkly.

    Declaration
    public IComponentConfigurer<IDataStore> DataStore { get; }
    Property Value
    Type Description
    IComponentConfigurer<IDataStore>
    Remarks

    The default is InMemoryDataStore, but you may provide a custom implementation.

    | Edit this page View Source

    DiagnosticOptOut

    True if diagnostic events have been disabled.

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

    Events

    A factory object that creates an implementation of IEventProcessor, which will process all analytics events.

    Declaration
    public IComponentConfigurer<IEventProcessor> Events { get; }
    Property Value
    Type Description
    IComponentConfigurer<IEventProcessor>
    Remarks

    The default is SendEvents(), but you may provide a custom implementation.

    | Edit this page View Source

    Hooks

    Hooks configuration which contains a list of zero or more hooks to be executed by the SDK at points of interest.

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

    Http

    A builder that creates an HttpConfiguration, defining the SDK's networking behavior.

    Declaration
    public IComponentConfigurer<HttpConfiguration> Http { get; }
    Property Value
    Type Description
    IComponentConfigurer<HttpConfiguration>
    | Edit this page View Source

    Logging

    A builder that creates a LoggingConfiguration, defining the SDK's logging configuration.

    Declaration
    public IComponentConfigurer<LoggingConfiguration> Logging { get; }
    Property Value
    Type Description
    IComponentConfigurer<LoggingConfiguration>
    Remarks

    SDK components should not use this property directly; instead, the SDK client will use it to create a logger instance which will be in LdClientContext.

    | 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
    | Edit this page View Source

    SdkKey

    The SDK key for your LaunchDarkly environment.

    Declaration
    public string SdkKey { get; }
    Property Value
    Type Description
    string
    | 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
    | Edit this page View Source

    StartWaitTime

    How long the client constructor will block awaiting a successful connection to LaunchDarkly.

    Declaration
    public TimeSpan StartWaitTime { get; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    Setting this to 0 will not block and will cause the constructor to return immediately. The default value is 10 seconds.

    | Edit this page View Source

    WrapperInfo

    WrapperInfo configuration which contains wrapper configuration. This is primarily intended for use by LaunchDarkly when developing wrapper SDKs.

    Declaration
    public WrapperInfoBuilder WrapperInfo { get; }
    Property Value
    Type Description
    WrapperInfoBuilder

    Methods

    | Edit this page View Source

    Builder(Configuration)

    Creates an ConfigurationBuilder based on an existing configuration.

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

    the existing configuration

    Returns
    Type Description
    ConfigurationBuilder

    a builder object

    Remarks

    Modifying properties of the builder will not affect the original configuration object.

    Examples
    var configWithCustomEventProperties = Configuration.Builder(originalConfig)
        .Events(Components.SendEvents().Capacity(50000))
        .Build();
    | Edit this page View Source

    Builder(string)

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

    Declaration
    public static ConfigurationBuilder Builder(string sdkKey)
    Parameters
    Type Name Description
    string sdkKey

    the SDK key for your LaunchDarkly environment

    Returns
    Type Description
    ConfigurationBuilder

    a builder object

    Remarks

    This is the only method for building a Configuration if you are setting properties besides the SdkKey. 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")
        .StartWaitTime(TimeSpan.FromSeconds(5))
        .Build();
    | Edit this page View Source

    Default(string)

    Creates a configuration with all parameters set to the default.

    Declaration
    public static Configuration Default(string sdkKey)
    Parameters
    Type Name Description
    string sdkKey

    the SDK key for your LaunchDarkly environment

    Returns
    Type Description
    Configuration

    a Configuration instance

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