public OmsOutput(OmsOutputConfiguration configuration, IHealthReporter healthReporter)
        {
            Requires.NotNull(configuration, nameof(configuration));
            Requires.NotNull(healthReporter, nameof(healthReporter));

            this.healthReporter = healthReporter;
            this.connectionData = CreateConnectionData(configuration);
        }
Example #2
0
        public OmsOutput(IConfiguration configuration, IHealthReporter healthReporter)
        {
            Requires.NotNull(configuration, nameof(configuration));
            Requires.NotNull(healthReporter, nameof(healthReporter));

            this.healthReporter = healthReporter;
            var omsOutputConfiguration = new OmsOutputConfiguration();

            try
            {
                configuration.Bind(omsOutputConfiguration);
            }
            catch
            {
                healthReporter.ReportProblem($"Invalid {nameof(OmsOutput)} configuration encountered: '{configuration.ToString()}'",
                                             EventFlowContextIdentifiers.Configuration);
                throw;
            }

            this.connectionData = CreateConnectionData(omsOutputConfiguration);
        }
 private void Initialize(OmsOutputConfiguration configuration)
 {
     this.connectionData = CreateConnectionData(configuration);
     SerializerSettings  = EventFlowJsonUtilities.GetDefaultSerializerSettings();
 }