Ejemplo n.º 1
0
        /// <summary>
        /// Extension method for adding the Seq integration to the the WardenConfiguration.
        /// </summary>
        /// <param name="builder">Instance of the Warden configuration builder.</param>
        /// <param name="configuration">Configuration of SeqIntegration.</param>
        /// <returns>Instance of fluent builder for the WardenConfiguration.</returns>
        public static WardenConfiguration.Builder IntegrateWithSeq(
            this WardenConfiguration.Builder builder,
            SeqIntegrationConfiguration configuration)
        {
            builder.AddIntegration(SeqIntegration.Create(configuration));

            return(builder);
        }
Ejemplo n.º 2
0
        public SeqIntegration(SeqIntegrationConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration),
                                                "Seq Integration configuration has not been provided.");
            }

            _configuration = configuration;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Factory method for creating a new instance of SeqIntegration.
 /// </summary>
 /// <param name="configuration">Configuration of Seq integration.</param>
 /// <returns>Instance of SeqIntegration.</returns>
 public static SeqIntegration Create(SeqIntegrationConfiguration configuration)
 => new SeqIntegration(configuration);
 public Builder(string url, string apiKey = null)
 {
     Configuration = new SeqIntegrationConfiguration(url, apiKey);
 }