Пример #1
0
 public TracingDiagnosticMethod(ITracingDiagnosticProcessor TracingDiagnosticProcessor, MethodInfo MethodInfo, String DiagnosticName)
 {
     _TracingDiagnosticProcessor = TracingDiagnosticProcessor;
     _Reflector          = MethodInfo.GetReflector();
     _DiagnosticName     = DiagnosticName;
     _RarameterResolvers = GetParameterResolvers(MethodInfo).ToArray();
 }
 public TracingDiagnosticObserver(ITracingDiagnosticProcessor tracingDiagnosticProcessor,
                                  ILoggerFactory loggerFactory)
 {
     _methodCollection = new TracingDiagnosticMethodCollection(tracingDiagnosticProcessor)
                         .ToDictionary(method => method.DiagnosticName);
     _logger = loggerFactory.CreateLogger(typeof(TracingDiagnosticObserver));
 }
Пример #3
0
        protected virtual void Subscribe(DiagnosticListener listener,
                                         ITracingDiagnosticProcessor tracingDiagnosticProcessor)
        {
            var diagnosticProcessor = new TracingDiagnosticObserver(tracingDiagnosticProcessor, _loggerFactory);

            listener.Subscribe(diagnosticProcessor, diagnosticProcessor.IsEnabled);
        }
 public TracingDiagnosticMethod(ITracingDiagnosticProcessor tracingDiagnosticProcessor, MethodInfo method,
                                string diagnosticName)
 {
     _tracingDiagnosticProcessor = tracingDiagnosticProcessor;
     _reflector          = method.GetReflector();
     _diagnosticName     = diagnosticName;
     _parameterResolvers = GetParameterResolvers(method).ToArray();
 }
Пример #5
0
 public TracingDiagnosticMethod(ITracingDiagnosticProcessor diagnosticProcessor, MethodInfo method,
                                string diagnosticName)
 {
     _diagnosticProcessor = diagnosticProcessor;
     _method             = method;
     _diagnosticName     = diagnosticName;
     _parameterResolvers = GetParameterResolvers(method).ToArray();
 }
Пример #6
0
 public TracingDiagnosticMethodCollection(ITracingDiagnosticProcessor tracingDiagnosticProcessor)
 {
     _methods = new List <TracingDiagnosticMethod>();
     foreach (var method in tracingDiagnosticProcessor.GetType().GetMethods())
     {
         var diagnosticName = method.GetCustomAttribute <DiagnosticName>();
         if (diagnosticName == null)
         {
             continue;
         }
         _methods.Add(new TracingDiagnosticMethod(tracingDiagnosticProcessor, method, diagnosticName.Name));
     }
 }
Пример #7
0
 public TracingDiagnosticObserver(ITracingDiagnosticProcessor tracingDiagnosticProcessor)
 {
     _methodCollection = new TracingDiagnosticMethodCollection(tracingDiagnosticProcessor);
 }
Пример #8
0
 protected virtual void Subscribe(DiagnosticListener listener,
                                  ITracingDiagnosticProcessor tracingDiagnosticProcessor)
 {
     listener.Subscribe(new TracingDiagnosticObserver(tracingDiagnosticProcessor, _loggerFactory));
 }
 protected abstract void OnNext(DiagnosticListener listener,
                                ITracingDiagnosticProcessor diagnosticProcessor);
 protected override void OnNext(DiagnosticListener listener, ITracingDiagnosticProcessor diagnosticProcessor)
 {
     listener.SubscribeWithAdapter(diagnosticProcessor);
 }
 protected virtual void Subscribe(DiagnosticListener listener,
                                  ITracingDiagnosticProcessor diagnosticProcessor)
 {
     listener.Subscribe(new TracingDiagnosticObserver(diagnosticProcessor));
 }