- Timestamp:
- 03/22/11 16:45:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Parameters/3.3/Parameter.cs
r5445 r5796 55 55 } 56 56 57 [Storable(DefaultValue = false)] 58 private bool hidden; 59 public bool Hidden { 60 get { return hidden; } 61 set { 62 if (value != hidden) { 63 hidden = value; 64 OnHiddenChanged(); 65 } 66 } 67 } 68 57 69 private Lazy<ThreadLocal<IItem>> cachedActualValues; 58 70 public IItem ActualValue { … … 86 98 : base(original, cloner) { 87 99 dataType = original.dataType; 100 hidden = original.hidden; 88 101 cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication); 89 102 executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication); … … 92 105 : base("Anonymous") { 93 106 dataType = typeof(IItem); 107 hidden = false; 94 108 cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication); 95 109 executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication); … … 99 113 if (dataType == null) throw new ArgumentNullException(); 100 114 this.dataType = dataType; 115 hidden = false; 101 116 cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication); 102 117 executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication); … … 106 121 if (dataType == null) throw new ArgumentNullException(); 107 122 this.dataType = dataType; 123 hidden = false; 108 124 cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication); 109 125 executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication); … … 116 132 protected abstract IItem GetActualValue(); 117 133 protected abstract void SetActualValue(IItem value); 134 135 public event EventHandler HiddenChanged; 136 protected virtual void OnHiddenChanged() { 137 EventHandler handler = HiddenChanged; 138 if (handler != null) handler(this, EventArgs.Empty); 139 } 118 140 } 119 141 }
Note: See TracChangeset
for help on using the changeset viewer.