Changeset 3406
- Timestamp:
- 04/19/10 03:08:10 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/Content/StorableContent.cs
r3405 r3406 24 24 using System.Linq; 25 25 using System.Text; 26 using System.Threading; 27 using System.Reflection; 26 28 27 29 namespace HeuristicLab.Common { … … 66 68 67 69 protected void PropagateSaveEnabledChanges() { 68 //TODO implement propagation of changes 70 Type type = this.GetType(); 71 foreach (FieldInfo fieldInfo in type.GetFields(BindingFlags.Default)) { 72 if (typeof(IStorableContent).IsAssignableFrom(fieldInfo.GetType())) { 73 IStorableContent storableContent = (IStorableContent)fieldInfo.GetValue(this); 74 storableContent.SaveEnabled = this.saveEnabled; 75 } 76 } 69 77 } 70 78 … … 83 91 84 92 protected virtual void SaveAsnychronous() { 85 //TODO implement async call to save method 93 ThreadPool.QueueUserWorkItem( 94 new WaitCallback(delegate(object arg) { 95 try { this.Save(); } 96 catch (Exception ex) { 97 this.OnSaveOperationFinished(ex); 98 } 99 }) 100 ); 86 101 } 87 102 void IStorableContent.SaveAsynchronous() {
Note: See TracChangeset
for help on using the changeset viewer.