Пример #1
0
        /// <summary>
        /// Configure which Owin metrics to be registered.
        /// </summary>
        /// <param name="config">Action used to configure Owin metrics.</param>
        /// <param name="ignoreRequestPathPatterns">Patterns for paths to ignore.</param>
        /// <param name="owinContext">Name of the metrics context where to register the metrics.</param>
        /// <returns>Chainable configuration object.</returns>
        public OwinMetricsConfig WithRequestMetricsConfig(Action<OwinRequestMetricsConfig> config,
            Regex[] ignoreRequestPathPatterns = null, string owinContext = "Owin")
        {
            OwinRequestMetricsConfig requestConfig = new OwinRequestMetricsConfig(this.middlewareRegistration,
                this.context.Context(owinContext), ignoreRequestPathPatterns);

            config(requestConfig);

            return this;
        }
Пример #2
0
        /// <summary>
        /// Configure which Owin metrics to be registered.
        /// </summary>
        /// <param name="config">Action used to configure Owin metrics.</param>
        /// <param name="ignoreRequestPathPatterns">Patterns for paths to ignore.</param>
        /// <param name="owinContext">Name of the metrics context where to register the metrics.</param>
        /// <returns>Chainable configuration object.</returns>
        public OwinMetricsConfig WithRequestMetricsConfig(Action <OwinRequestMetricsConfig> config,
                                                          Regex[] ignoreRequestPathPatterns = null, string owinContext = "Owin")
        {
            OwinRequestMetricsConfig requestConfig = new OwinRequestMetricsConfig(this.middlewareRegistration,
                                                                                  this.context.Context(owinContext), ignoreRequestPathPatterns);

            config(requestConfig);

            return(this);
        }
Пример #3
0
 public OwinMetricsConfig WithRequestMetricsConfig(Action<OwinRequestMetricsConfig> config)
 {
     OwinRequestMetricsConfig requestConfig = new OwinRequestMetricsConfig(this.middlewareRegistration, this.registry);
     config(requestConfig);
     return this;
 }