internal ConfigurationBuilder(Configuration copyFrom) { _dataSourceFactory = copyFrom.DataSourceFactory; _dataStoreFactory = copyFrom.DataStoreFactory; _diagnosticOptOut = copyFrom.DiagnosticOptOut; _eventProcessorFactory = copyFrom.EventProcessorFactory; _httpConfigurationFactory = copyFrom.HttpConfigurationFactory; _loggingConfigurationFactory = copyFrom.LoggingConfigurationFactory; _offline = copyFrom.Offline; _sdkKey = copyFrom.SdkKey; _startWaitTime = copyFrom.StartWaitTime; }
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 SDK's logging configuration, using a factory object. /// </summary> /// <remarks> /// <para> /// This object is normally a configuration builder obtained from <see cref="Components.Logging()"/> /// which has methods for setting individual logging-related properties. As a shortcut for disabling /// logging, you may use <see cref="Components.NoLogging"/> instead. If all you want to do is to set /// the basic logging destination, and you do not need to set other logging properties, you can use /// <see cref="Logging(ILogAdapter)"/> instead. /// </para> /// <para> /// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK /// SDK reference guide</a>. /// </para> /// </remarks> /// <example> /// var config = Configuration.Builder("my-sdk-key") /// .Logging(Components.Logging().Level(LogLevel.Warn))) /// .Build(); /// </example> /// <param name="loggingConfigurationFactory">the factory object</param> /// <returns>the same builder</returns> /// <seealso cref="Components.Logging()" /> /// <seealso cref="Components.Logging(ILogAdapter) "/> /// <seealso cref="Components.NoLogging" /> /// <seealso cref="Logging(ILogAdapter)"/> public ConfigurationBuilder Logging(ILoggingConfigurationFactory loggingConfigurationFactory) { _loggingConfigurationFactory = loggingConfigurationFactory; return(this); }