- Timestamp:
- 05/14/11 16:45:46 (13 years ago)
- Location:
- branches/histogram
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
-
branches/histogram/HeuristicLab.Operators/3.3/Operator.cs
r5445 r6195 33 33 [Item("Operator", "Base class for operators.")] 34 34 [StorableClass] 35 public abstract class Operator : ParameterizedNamedItem, IOperator {35 public abstract class Operator : ParameterizedNamedItem, IOperator, IStatefulItem { 36 36 public override Image ItemImage { 37 37 get { … … 107 107 } 108 108 109 public virtual void InitializeState() { } 110 public virtual void ClearState() { 111 executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication); 112 } 113 109 114 public virtual IOperation Execute(IExecutionContext context, CancellationToken cancellationToken) { 110 115 try { … … 116 121 OnExecuted(); 117 122 return next; 118 } finally { 123 } 124 finally { 119 125 foreach (IParameter param in Parameters) 120 126 param.ExecutionContext = null;
Note: See TracChangeset
for help on using the changeset viewer.