Changeset 6945 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/SlaveCommunicationService.cs
- Timestamp:
- 11/02/11 18:42:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/SlaveCommunicationService.cs
r6371 r6945 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.ServiceModel; … … 54 55 55 56 public void LogMessage(string message) { 56 subscribers.ForEach(delegate(ISlaveCommunicationCallbacks callback) { 57 if (((ICommunicationObject)callback).State == CommunicationState.Opened) { 58 callback.OnMessageLogged(message); 59 } else { 60 subscribers.Remove(callback); 61 } 62 }); 57 try { 58 subscribers.ForEach(delegate(ISlaveCommunicationCallbacks callback) { 59 if (((ICommunicationObject)callback).State == CommunicationState.Opened) { 60 callback.OnMessageLogged(message); 61 } else { 62 subscribers.Remove(callback); 63 } 64 }); 65 } 66 catch (Exception ex) { 67 EventLogManager.LogException(ex); 68 } 63 69 } 64 70 65 71 public void StatusChanged(StatusCommons status) { 66 subscribers.ForEach(delegate(ISlaveCommunicationCallbacks callback) { 67 if (((ICommunicationObject)callback).State == CommunicationState.Opened) { 68 callback.OnStatusChanged(status); 69 } else { 70 subscribers.Remove(callback); 71 } 72 }); 72 try { 73 subscribers.ForEach(delegate(ISlaveCommunicationCallbacks callback) { 74 if (((ICommunicationObject)callback).State == CommunicationState.Opened) { 75 callback.OnStatusChanged(status); 76 } else { 77 subscribers.Remove(callback); 78 } 79 }); 80 } 81 catch (Exception ex) { 82 EventLogManager.LogException(ex); 83 } 73 84 } 74 85
Note: See TracChangeset
for help on using the changeset viewer.