public LogsharkConfiguration(LogsharkConfig config) { MongoConnectionInfo = new MongoConnectionInfo(config.MongoConnection); PostgresConnectionInfo = new PostgresConnectionInfo(config.PostgresConnection); TableauConnectionInfo = new TableauServerConnectionInfo(config.TableauConnection); LocalMongoOptions = new LogsharkLocalMongoOptions(config.RunOptions.LocalMongo); TuningOptions = new LogsharkTuningOptions(config.RunOptions.Tuning); ArtifactProcessorOptions = new LogsharkArtifactProcessorOptions(config.ArtifactProcessorOptions); }
public LogsharkConfiguration(LogsharkConfig config) { MongoConnectionInfo = new MongoConnectionInfo(config.MongoConnection); if (!string.IsNullOrWhiteSpace(config.PostgresConnection.Server.Server) && !config.PostgresConnection.Server.Server.Equals("unspecified", StringComparison.OrdinalIgnoreCase)) { PostgresConnectionInfo = Option.Some(new PostgresConnectionInfo(config.PostgresConnection)); } TableauConnectionInfo = new TableauServerConnectionInfo(config.TableauConnection); DataRetentionOptions = new LogsharkDataRetentionOptions(config.RunOptions.DataRetention); LocalMongoOptions = new LogsharkLocalMongoOptions(config.RunOptions.LocalMongo); TuningOptions = new LogsharkTuningOptions(config.RunOptions.Tuning); ArtifactProcessorOptions = new LogsharkArtifactProcessorOptions(config.ArtifactProcessorOptions); ApplicationTempDirectory = GetApplicationTempDirectory(config); ApplicationOutputDirectory = GetApplicationOutputDirectory(); }