public void RequestStop(HangDetector hangDetector) { ExTraceGlobals.TimeBasedAssistantControllerTracer.TraceDebug <TimeBasedAssistantController>((long)this.GetHashCode(), "{0}: Stopping", this); AssistantsRpcServer.DeregisterAssistant(this.timeBasedAssistantType.NonLocalizedName); if (this.workCycleConfigurationTimer != null) { this.workCycleConfigurationTimer.Dispose(); this.workCycleConfigurationTimer = null; } this.DeinitializeTimer(); lock (this.assistantDrivers) { foreach (TimeBasedDatabaseDriver timeBasedDatabaseDriver in this.assistantDrivers.Values) { if (timeBasedDatabaseDriver != null) { if (hangDetector != null) { hangDetector.AssistantName = timeBasedDatabaseDriver.Assistant.NonLocalizedName; } try { timeBasedDatabaseDriver.RequestStop(); } finally { if (hangDetector != null) { hangDetector.AssistantName = "Common Code"; } } } } } }
// Token: 0x060000D1 RID: 209 RVA: 0x00005694 File Offset: 0x00003894 public override int HaltHR(string assistantName) { AssistantsRpcServer.Tracer.TraceDebug <string>((long)this.GetHashCode(), "HaltHR requested for assistant={0}", assistantName); return(AssistantsRpcServer.Execute(delegate { TimeBasedAssistantController controller = AssistantsRpcServer.GetController(assistantName); controller.Halt(); }, assistantName)); }
// Token: 0x060000D3 RID: 211 RVA: 0x000057CC File Offset: 0x000039CC private static int Execute(GrayException.UserCodeDelegate function, string assistantName) { Exception exception = null; AssistantsRpcServer.Tracer.TraceDebug <string>(0L, "Executing the RPC request for assistant {0}.", assistantName); try { GrayException.MapAndReportGrayExceptions(delegate() { try { function(); } catch (MapiExceptionMdbOffline exception3) { exception = exception3; } catch (MapiExceptionNotFound exception4) { exception = exception4; } catch (MailboxOrDatabaseNotSpecifiedException exception5) { exception = exception5; } catch (UnknownAssistantException exception6) { exception = exception6; } catch (UnknownDatabaseException exception7) { exception = exception7; } catch (TransientException exception8) { exception = exception8; } }); } catch (GrayException exception) { GrayException exception9; exception = exception9; } catch (Exception exception2) { exception = exception2; ExWatson.SendReportAndCrashOnAnotherThread(exception2); } if (exception != null) { return(AssistantsRpcServer.LogExceptionAndGetHR(exception, assistantName)); } return(0); }
// Token: 0x060000D0 RID: 208 RVA: 0x000055CC File Offset: 0x000037CC public override int RunNowWithParamsHR(string assistantName, ValueType mailboxGuid, ValueType mdbGuid, string parameters) { AssistantsRpcServer.Tracer.TraceDebug((long)this.GetHashCode(), "RunNowWithParamsHR requested for assistant={0}, mailbox={1}, database={2}, parameters={3}", new object[] { assistantName, mailboxGuid, mdbGuid, string.IsNullOrEmpty(parameters) ? "<null>" : parameters }); return(AssistantsRpcServer.Execute(delegate { TimeBasedAssistantController controller = AssistantsRpcServer.GetController(assistantName); controller.RunNow((Guid)mailboxGuid, (Guid)mdbGuid, parameters); }, assistantName)); }
public void Start(SecurityIdentifier exchangeServersSid) { ExTraceGlobals.TimeBasedDriverManagerTracer.TraceDebug <TimeBasedDriverManager>((long)this.GetHashCode(), "{0}: Starting", this); foreach (TimeBasedAssistantControllerWrapper timeBasedAssistantControllerWrapper in this.TimeBasedAssistantControllerArray) { timeBasedAssistantControllerWrapper.Controller.Start(); SystemWorkloadManager.RegisterWorkload(timeBasedAssistantControllerWrapper); } if (this.provideAssistantsRpc) { AssistantsRpcServer.StartServer(exchangeServersSid); this.rpcServerStarted = true; } base.TracePfd("PFD AIS {0} {1}: Started", new object[] { 25175, this }); }