LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Class StreamingDataSourceBuilder

    Contains methods for configuring the streaming data source.

    Inheritance
    object
    StreamingDataSourceBuilder
    Implements
    IComponentConfigurer<IDataSource>
    IDiagnosticDescription
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Client.Integrations
    Assembly: LaunchDarkly.ClientSdk.dll
    Syntax
    public sealed class StreamingDataSourceBuilder : IComponentConfigurer<IDataSource>, IDiagnosticDescription
    Remarks

    By default, the SDK uses a streaming connection to receive feature flag data from LaunchDarkly. If you want to customize the behavior of the connection, create a builder with StreamingDataSource(), change its properties with the methods of this class, and pass it to DataSource(IComponentConfigurer<IDataSource>).

    Setting Offline(bool) to true will supersede this setting and completely disable network requests.

    Examples
    var config = Configuration.Builder(sdkKey)
        .DataSource(Components.PollingDataSource()
            .PollInterval(TimeSpan.FromSeconds(45)))
        .Build();

    Constructors

    View Source

    StreamingDataSourceBuilder()

    Declaration
    public StreamingDataSourceBuilder()

    Fields

    | Edit this page View Source

    DefaultInitialReconnectDelay

    The default value for InitialReconnectDelay(TimeSpan): 1000 milliseconds.

    Declaration
    public static readonly TimeSpan DefaultInitialReconnectDelay
    Field Value
    Type Description
    TimeSpan

    Methods

    | Edit this page View Source

    BackgroundPollInterval(TimeSpan)

    Sets the interval between feature flag updates when the application is running in the background.

    Declaration
    public StreamingDataSourceBuilder BackgroundPollInterval(TimeSpan backgroundPollInterval)
    Parameters
    Type Name Description
    TimeSpan backgroundPollInterval

    the background polling interval

    Returns
    Type Description
    StreamingDataSourceBuilder

    the same builder

    Remarks

    This is only relevant on mobile platforms. The default is DefaultBackgroundPollInterval; the minimum is MinimumBackgroundPollInterval.

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

    Build(LdClientContext)

    Called internally by the SDK to create an implementation instance. Applications should not need to call this method.

    Declaration
    public IDataSource Build(LdClientContext clientContext)
    Parameters
    Type Name Description
    LdClientContext clientContext
    Returns
    Type Description
    IDataSource

    a instance of the component type

    | Edit this page View Source

    DescribeConfiguration(LdClientContext)

    Called internally by the SDK to inspect the configuration. Applications do not need to call this method.

    Declaration
    public LdValue DescribeConfiguration(LdClientContext context)
    Parameters
    Type Name Description
    LdClientContext context

    the context object that may provide relevant configuration details

    Returns
    Type Description
    LdValue

    a JSON value

    | Edit this page View Source

    InitialReconnectDelay(TimeSpan)

    Sets the initial reconnect delay for the streaming connection.

    Declaration
    public StreamingDataSourceBuilder InitialReconnectDelay(TimeSpan initialReconnectDelay)
    Parameters
    Type Name Description
    TimeSpan initialReconnectDelay

    the reconnect time base value

    Returns
    Type Description
    StreamingDataSourceBuilder

    the builder

    Remarks

    The streaming service uses a backoff algorithm (with jitter) every time the connection needs to be reestablished.The delay for the first reconnection will start near this value, and then increase exponentially for any subsequent connection failures.

    The default value is DefaultInitialReconnectDelay.

    Implements

    IComponentConfigurer<T>
    IDiagnosticDescription
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX