internal ConfigurationBuilder(Configuration copyFrom) { _bigSegmentsConfigurationFactory = copyFrom.BigSegmentsConfigurationFactory; _dataSourceFactory = copyFrom.DataSourceFactory; _dataStoreFactory = copyFrom.DataStoreFactory; _diagnosticOptOut = copyFrom.DiagnosticOptOut; _eventProcessorFactory = copyFrom.EventProcessorFactory; _httpConfigurationFactory = copyFrom.HttpConfigurationFactory; _loggingConfigurationFactory = copyFrom.LoggingConfigurationFactory; _offline = copyFrom.Offline; _sdkKey = copyFrom.SdkKey; _serviceEndpointsBuilder = new ServiceEndpointsBuilder(copyFrom.ServiceEndpoints); _startWaitTime = copyFrom.StartWaitTime; }
/// <summary> /// Sets the configuration of the SDK's Big Segments feature. /// </summary> /// <remarks> /// <para> /// "Big Segments" are a specific type of user segments. For more information, read the LaunchDarkly /// documentation about user segments: https://docs.launchdarkly.com/home/users/segments /// </para> /// <para> /// If you are using this feature, you will normally specify a database implementation that matches how /// the LaunchDarkly Relay Proxy is configured, since the Relay Proxy manages the Big Segment data. /// </para> /// <para> /// By default, there is no implementation and Big Segments cannot be evaluated. In this case, any flag /// evaluation that references a Big Segment will behave as if no users are included in any Big /// Segments, and the <see cref="EvaluationReason"/> associated with any such flag evaluation will have /// a <see cref="EvaluationReason.BigSegmentsStatus"/> of <see cref="BigSegmentsStatus.NotConfigured"/>. /// </para> /// </remarks> /// <example> /// <code> /// // This example uses the Redis integration /// var config = Configuration.Builder(sdkKey) /// .BigSegments(Components.BigSegments(Redis.DataStore().Prefix("app1")) /// .UserCacheSize(2000)) /// .Build(); /// </code> /// </example> /// <param name="bigSegmentsConfigurationFactory">a configuration factory object returned by /// <see cref="Components.BigSegments(IBigSegmentStoreFactory)"/></param> /// <returns>the same builder</returns> public ConfigurationBuilder BigSegments(IBigSegmentsConfigurationFactory bigSegmentsConfigurationFactory) { _bigSegmentsConfigurationFactory = bigSegmentsConfigurationFactory; return(this); }