Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Common/3.3/Content/ContentManager.cs
- Timestamp:
- 05/04/17 17:19:35 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Common/3.3/Content/ContentManager.cs
r14185 r14927 43 43 if (instance == null) throw new InvalidOperationException("ContentManager is not initialized."); 44 44 var func = new Func<string, IStorableContent>(instance.LoadContent); 45 func.BeginInvoke(filename, delegate (IAsyncResult result) {45 func.BeginInvoke(filename, delegate (IAsyncResult result) { 46 46 Exception error = null; 47 47 IStorableContent content = null; … … 49 49 content = func.EndInvoke(result); 50 50 content.Filename = filename; 51 } 52 catch (Exception ex) { 51 } catch (Exception ex) { 53 52 error = ex; 54 53 } … … 66 65 if (instance == null) throw new InvalidOperationException("ContentManager is not initialized."); 67 66 var action = new Action<IStorableContent, string, bool>(instance.SaveContent); 68 action.BeginInvoke(content, filename, compressed, delegate (IAsyncResult result) {67 action.BeginInvoke(content, filename, compressed, delegate (IAsyncResult result) { 69 68 Exception error = null; 70 69 try { 71 70 action.EndInvoke(result); 72 71 content.Filename = filename; 73 } 74 catch (Exception ex) { 72 } catch (Exception ex) { 75 73 error = ex; 76 74 }
Note: See TracChangeset
for help on using the changeset viewer.