- Timestamp:
- 05/04/17 17:19:35 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Clients.Access.Administration/3.3/AccessAdministrationClient.cs
r14185 r14927 159 159 160 160 public void ExecuteActionAsync(Action action, Action<Exception> exceptionCallback) { 161 var call = new Func<Exception>(delegate () {161 var call = new Func<Exception>(delegate () { 162 162 try { 163 163 OnRefreshing(); 164 164 action(); 165 } 166 catch (Exception ex) { 165 } catch (Exception ex) { 167 166 return ex; 168 } 169 finally { 167 } finally { 170 168 OnRefreshed(); 171 169 } 172 170 return null; 173 171 }); 174 call.BeginInvoke(delegate (IAsyncResult result) {172 call.BeginInvoke(delegate (IAsyncResult result) { 175 173 Exception ex = call.EndInvoke(result); 176 174 if (ex != null) exceptionCallback(ex); … … 196 194 try { 197 195 call(client); 198 } 199 finally { 196 } finally { 200 197 try { 201 198 client.Close(); 202 } 203 catch (Exception) { 199 } catch (Exception) { 204 200 client.Abort(); 205 201 } … … 210 206 try { 211 207 return call(client); 212 } 213 finally { 208 } finally { 214 209 try { 215 210 client.Close(); 216 } 217 catch (Exception) { 211 } catch (Exception) { 218 212 client.Abort(); 219 213 }
Note: See TracChangeset
for help on using the changeset viewer.