- Timestamp:
- 02/15/11 17:58:28 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r5469 r5472 111 111 112 112 private void RegisterServiceEvents() { 113 WcfService.Instance.Connected += new EventHandler( wcfService_Connected);114 WcfService.Instance.ExceptionOccured += new EventHandler<EventArgs<Exception>>( wcfService_ExceptionOccured);113 WcfService.Instance.Connected += new EventHandler(WcfService_Connected); 114 WcfService.Instance.ExceptionOccured += new EventHandler<EventArgs<Exception>>(WcfService_ExceptionOccured); 115 115 } 116 116 117 117 private void DeRegisterServiceEvents() { 118 WcfService.Instance.Connected -= wcfService_Connected;119 WcfService.Instance.ExceptionOccured -= wcfService_ExceptionOccured;120 } 121 122 void wcfService_ExceptionOccured(object sender, EventArgs<Exception> e) {118 WcfService.Instance.Connected -= WcfService_Connected; 119 WcfService.Instance.ExceptionOccured -= WcfService_ExceptionOccured; 120 } 121 122 void WcfService_ExceptionOccured(object sender, EventArgs<Exception> e) { 123 123 ClientCom.LogMessage("Connection to server interruped with exception: " + e.Value.Message); 124 124 } 125 125 126 void wcfService_Connected(object sender, EventArgs e) {126 void WcfService_Connected(object sender, EventArgs e) { 127 127 ClientCom.LogMessage("Connected successfully to Hive server"); 128 128 } … … 299 299 foreach (KeyValuePair<Guid, AppDomain> kvp in appDomains) { 300 300 ClientCom.LogMessage("Shutting down Appdomain for " + kvp.Key); 301 appDomains[kvp.Key].UnhandledException -= new UnhandledExceptionEventHandler( appDomain_UnhandledException);301 appDomains[kvp.Key].UnhandledException -= new UnhandledExceptionEventHandler(AppDomain_UnhandledException); 302 302 AppDomain.Unload(kvp.Value); 303 303 } … … 417 417 try { 418 418 AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(myJob.Id.ToString(), pluginDir, Path.Combine(pluginDir, configFileName)); 419 appDomain.UnhandledException += new UnhandledExceptionEventHandler( appDomain_UnhandledException);419 appDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_UnhandledException); 420 420 lock (engines) { 421 421 if (!jobs.ContainsKey(myJob.Id)) { … … 451 451 } 452 452 453 private void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {453 private void AppDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { 454 454 ClientCom.LogMessage("Exception in AppDomain: " + e.ExceptionObject.ToString()); 455 455 KillAppDomain(new Guid(e.ExceptionObject.ToString())); … … 492 492 493 493 if (appDomains.ContainsKey(id)) { 494 appDomains[id].UnhandledException -= new UnhandledExceptionEventHandler( appDomain_UnhandledException);494 appDomains[id].UnhandledException -= new UnhandledExceptionEventHandler(AppDomain_UnhandledException); 495 495 496 496 int repeat = 5; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs
r5469 r5472 61 61 } 62 62 63 private string getFilenameFromPath(string path) {63 private string GetFilenameFromPath(string path) { 64 64 string[] dirParts = path.Split(Path.DirectorySeparatorChar); 65 65 if (dirParts.Length > 0) { … … 76 76 77 77 foreach (string dir in Directory.EnumerateDirectories(PluginCacheDir)) { 78 cachedPluginsGuids.Add(Guid.Parse( getFilenameFromPath(dir))); // Todo: cleaner solution to getFilenameFromPath78 cachedPluginsGuids.Add(Guid.Parse(GetFilenameFromPath(dir))); // Todo: cleaner solution to getFilenameFromPath 79 79 } 80 80 }
Note: See TracChangeset
for help on using the changeset viewer.