// Token: 0x0600000D RID: 13 RVA: 0x000024D8 File Offset: 0x000006D8 private static void StartServiceletThread(IServicelet servicelet) { new Thread(new ParameterizedThreadStart(MigrationWorkflowServiceHost.RunServicelet)) { Name = string.Format("{0}-Serviclet", servicelet.Name), IsBackground = true }.Start(servicelet); }
// Token: 0x0600000E RID: 14 RVA: 0x0000251C File Offset: 0x0000071C private bool StartServicelet(IServicelet servicelet) { bool result; try { if (!servicelet.IsEnabled) { this.logger.Log(MigrationEventType.Information, "Servicelet {0} is not enabled, skipped.", new object[] { servicelet.Name }); result = false; } else { this.logger.Log(MigrationEventType.Information, "Starting servicelet {0}.", new object[] { servicelet.Name }); this.logger.Log(MigrationEventType.Verbose, "Initializing servicelet.", new object[0]); if (!servicelet.Initialize()) { this.logger.Log(MigrationEventType.Verbose, "Servicelet did not initialize, not starting it.", new object[0]); result = false; } else { this.logger.Log(MigrationEventType.Verbose, "Registering diagnostics interfaces.", new object[0]); foreach (IDiagnosable diagnosable in servicelet.GetDiagnosableComponents()) { ProcessAccessManager.RegisterComponent(diagnosable); } MigrationWorkflowServiceHost.StartServiceletThread(servicelet); result = true; } } } catch (Exception ex) { this.LogEvent(MWSEventLogConstants.Tuple_ServiceletFailedToStart, new object[] { servicelet.Name, CommonUtils.FullExceptionMessage(ex, true) }); this.logger.LogError(ex, "Servicelet {0} failed to start.", new object[] { servicelet.Name }); if (!(ex is LocalizedException)) { throw; } result = false; } return(result); }
// Token: 0x0600000C RID: 12 RVA: 0x000024AC File Offset: 0x000006AC private static void RunServicelet(object serviceletObject) { IServicelet servicelet = serviceletObject as IServicelet; if (servicelet == null) { return; } ExWatson.SendReportOnUnhandledException(new ExWatson.MethodDelegate(servicelet.Run)); }