Esempio n. 1
0
 /// <summary>
 ///     Creates an instance of the <see cref="PerformanceLogInterceptor" />.
 /// </summary>
 /// <param name="traceSourceType">The trace source type.</param>
 /// <param name="traceSourceName">The name of the trace source.</param>
 public PerformanceLogInterceptor(TraceSourceType?traceSourceType, string traceSourceName)
 {
     if (!traceSourceType.HasValue || string.IsNullOrEmpty(traceSourceName))
     {
         _tracer = DotNetTracerFactory.Instance.GetCurrentTracer();
     }
     else
     {
         _tracer = DotNetTracerFactory.Instance.CreateTracer(traceSourceType.Value, traceSourceName);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Crée une instance de <see cref="MonitoringMiddleware"/> en spécifiant le traceur du monitoring <see cref="IFrameworkTracer"/>.
 /// </summary>
 /// <param name="next">Le prochain middleware dans le pipeline.</param>
 /// <param name="tracer">Le traceur du monitoring <see cref="IFrameworkTracer"/>.</param>
 public MonitoringMiddleware(RequestDelegate next, IFrameworkTracer tracer)
 {
     _next   = next;
     _tracer = tracer;
 }