Exemple #1
0
        public static void RegisterAgentFactory(AgentFactory agentFactory)
        {
            IDiagnosable diagnosable = agentFactory as IDiagnosable;

            if (diagnosable != null)
            {
                ProcessAccessManager.RegisterComponent(diagnosable);
            }
        }
Exemple #2
0
 internal static void RegisterDiagnosticsComponents(IDiagnosable instance)
 {
     if (instance != null)
     {
         try
         {
             ProcessAccessManager.RegisterComponent(instance);
         }
         catch (RpcException ex)
         {
             FaultDiagnosticsComponent faultDiagnosticsComponent = new FaultDiagnosticsComponent();
             faultDiagnosticsComponent.SetComponentNameAndMessage(instance.GetDiagnosticComponentName(), -998, ex.ToString());
             ExTraceGlobals.CommonTracer.TraceError <string>(0L, "ExchangeDiagnosticsHelper::RegisterDiagnosticsComponents Exception:{0}", ex.ToString());
             try
             {
                 ProcessAccessManager.RegisterComponent(faultDiagnosticsComponent);
             }
             catch (RpcException ex2)
             {
                 ExTraceGlobals.CommonTracer.TraceError <string>(0L, "ExchangeDiagnosticsHelper::RegisterDiagnosticsComponents Exception while registering FaultDiagnosticsComponent. {0}", ex2.ToString());
             }
         }
     }
 }
Exemple #3
0
 public ExchangeDiagnostics(IDiagnosable diagnosable)
 {
     ProcessAccessManager.RegisterComponent(diagnosable);
     this.RegisteredDiagnosable = diagnosable;
 }