Changeset 4337 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs
- Timestamp:
- 08/27/10 11:46:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs
r4316 r4337 100 100 } 101 101 102 /// <summary> 103 /// Securely disposes a WCF client proxy object 104 /// </summary> 105 /// <param name="obj"></param> 106 public static void DisposeWcfClient(ICommunicationObject obj) { 107 if (obj != null) { 108 if (obj.State != CommunicationState.Faulted && 109 obj.State != CommunicationState.Closed) { 110 try { obj.Close(); } 111 catch (CommunicationObjectFaultedException) { obj.Abort(); } 112 catch (TimeoutException) { obj.Abort(); } 113 catch (Exception) { 114 obj.Abort(); 115 throw; 116 } 117 } else 118 obj.Abort(); 119 } 120 } 121 102 122 } 103 123
Note: See TracChangeset
for help on using the changeset viewer.