Ejemplo n.º 1
0
        internal static void RegisterDiagnosticsComponents()
        {
            ExchangeDiagnosticsSection config = ExchangeDiagnosticsSection.GetConfig();

            ExTraceGlobals.CommonTracer.TraceInformation <int>(0, 0L, "ExchangeDiagnosticsHelper::RegisterDiagnosticsComponents called. No of Component:{0}", config.DiagnosticComponents.Count);
            foreach (object obj in config.DiagnosticComponents)
            {
                DiagnosticsComponent diagnosticsComponent = (DiagnosticsComponent)obj;
                ExTraceGlobals.CommonTracer.TraceDebug(0L, "ExchangeDiagnosticsHelper::RegisterDiagnosticsComponents ComponentName:{0}, Type:{1}, MethodName:{2}, Argument:{3}", new object[]
                {
                    diagnosticsComponent.Name,
                    diagnosticsComponent.Implementation,
                    diagnosticsComponent.MethodName,
                    diagnosticsComponent.Argument
                });
                IDiagnosable instance = ExchangeDiagnosticsHelper.GetInstance(diagnosticsComponent);
                if (diagnosticsComponent.Data != null)
                {
                    IDiagnosableExtraData diagnosableExtraData = instance as IDiagnosableExtraData;
                    if (diagnosableExtraData != null)
                    {
                        diagnosableExtraData.SetData(diagnosticsComponent.Data);
                    }
                }
                ExchangeDiagnosticsHelper.RegisterDiagnosticsComponents(instance);
            }
        }
Ejemplo n.º 2
0
 public static void Register()
 {
     if (!AuditHealthHandler.isRegistered)
     {
         AuditHealthHandler.isRegistered = true;
         ExchangeDiagnosticsHelper.RegisterDiagnosticsComponents(AuditHealthHandler.Instance);
     }
 }