private static bool TryReadAdObjects() { ADOperationResult adoperationResult = DiagnosticsAggregationServicelet.GetLocalServer(); if (!adoperationResult.Succeeded) { Exception exception = adoperationResult.Exception; DiagnosticsAggregationServicelet.EventLog.LogEvent(MSExchangeDiagnosticsAggregationEventLogConstants.Tuple_DiagnosticsAggregationServiceletLoadFailed, null, new object[] { exception }); DiagnosticsAggregationServicelet.Log.Log(DiagnosticsAggregationEvent.ServiceletError, "Getting Local server failed. Details {0}", new object[] { exception }); ExTraceGlobals.DiagnosticsAggregationTracer.TraceError <Exception>(0L, "Encountered an error while getting local server object. Details {0}.", exception); return(false); } ADOperationResult adoperationResult2 = DiagnosticsAggregationServicelet.GetTransportSettings(); if (!adoperationResult2.Succeeded) { Exception exception2 = adoperationResult2.Exception; DiagnosticsAggregationServicelet.EventLog.LogEvent(MSExchangeDiagnosticsAggregationEventLogConstants.Tuple_DiagnosticsAggregationServiceletLoadFailed, null, new object[] { exception2 }); DiagnosticsAggregationServicelet.Log.Log(DiagnosticsAggregationEvent.ServiceletError, "Getting transportsettings failed. Details {0}", new object[] { exception2 }); ExTraceGlobals.DiagnosticsAggregationTracer.TraceError <Exception>(0L, "Encountered an error while getting TransportSettings configuration. Details {0}.", exception2); return(false); } return(true); }
private static void OnLocalServerChanged(ADNotificationEventArgs args) { ExTraceGlobals.DiagnosticsAggregationTracer.TraceDebug(0L, "LocalServer changed"); DiagnosticsAggregationServicelet.Log.Log(DiagnosticsAggregationEvent.Information, "LocalServer changed", new object[0]); DiagnosticsAggregationServicelet.GetLocalServer(); }