Index: trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj	(revision 10037)
+++ trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj	(revision 10149)
@@ -113,4 +113,5 @@
     <Compile Include="CheckedMultiOperator.cs" />
     <Compile Include="CombinedOperator.cs" />
+    <Compile Include="Operator.InstrumentedOperatorWrapper.cs" />
     <None Include="Plugin.cs.frame" />
     <Compile Include="ConditionalBranch.cs" />
@@ -119,4 +120,5 @@
     <Compile Include="AlgorithmOperator.cs" />
     <Compile Include="DataReducer.cs" />
+    <Compile Include="InstrumentedOperator.cs" />
     <Compile Include="LocalRandomCreator.cs" />
     <Compile Include="MultiOperator.cs" />
@@ -221,5 +223,5 @@
   -->
   <PropertyGroup>
-   <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
 set ProjectDir=$(ProjectDir)
 set SolutionDir=$(SolutionDir)
@@ -228,5 +230,5 @@
 call PreBuildEvent.cmd
 </PreBuildEvent>
-<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 export ProjectDir=$(ProjectDir)
 export SolutionDir=$(SolutionDir)
Index: trunk/sources/HeuristicLab.Operators/3.3/InstrumentedOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators/3.3/InstrumentedOperator.cs	(revision 10149)
+++ trunk/sources/HeuristicLab.Operators/3.3/InstrumentedOperator.cs	(revision 10149)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Operators {
+  [Item("InstrumentedOperator", "A operator that can execute pre- and post actions.")]
+  [StorableClass]
+  public abstract class InstrumentedOperator : SingleSuccessorOperator {
+    private const string BeforeExecutionOperatorsParameterName = "BeforeExecutionOperators";
+    private const string AfterExecutionOperatorsParameterName = "AfterExecutionOperators";
+
+    private IFixedValueParameter<ItemList<SingleSuccessorOperator>> BeforeExecutionOperatorsParameter {
+      get { return (IFixedValueParameter<ItemList<SingleSuccessorOperator>>)Parameters[BeforeExecutionOperatorsParameterName]; }
+    }
+    private IFixedValueParameter<ItemList<SingleSuccessorOperator>> AfterExecutionOperatorsParameter {
+      get { return (IFixedValueParameter<ItemList<SingleSuccessorOperator>>)Parameters[AfterExecutionOperatorsParameterName]; }
+    }
+
+    public ItemList<SingleSuccessorOperator> BeforeExecutionOperators {
+      get { return BeforeExecutionOperatorsParameter.Value; }
+    }
+    public ItemList<SingleSuccessorOperator> AfterExecutionOperators {
+      get { return AfterExecutionOperatorsParameter.Value; }
+    }
+
+    [StorableConstructor]
+    protected InstrumentedOperator(bool deserializing) : base(deserializing) { }
+    protected InstrumentedOperator(InstrumentedOperator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    protected InstrumentedOperator()
+      : base() {
+      Parameters.Add(new FixedValueParameter<ItemList<SingleSuccessorOperator>>(BeforeExecutionOperatorsParameterName, "Actions that are executed before the execution of the operator", new ItemList<SingleSuccessorOperator>()));
+      Parameters.Add(new FixedValueParameter<ItemList<SingleSuccessorOperator>>(AfterExecutionOperatorsParameterName, "Actions that are executed after the execution of the operator", new ItemList<SingleSuccessorOperator>()));
+      BeforeExecutionOperatorsParameter.Hidden = true;
+      AfterExecutionOperatorsParameter.Hidden = true;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      if (!Parameters.ContainsKey(BeforeExecutionOperatorsParameterName)) {
+        Parameters.Add(new FixedValueParameter<ItemList<SingleSuccessorOperator>>(BeforeExecutionOperatorsParameterName, "Actions that are executed before the execution of the operator", new ItemList<SingleSuccessorOperator>()));
+        BeforeExecutionOperatorsParameter.Hidden = true;
+      }
+      if (!Parameters.ContainsKey(AfterExecutionOperatorsParameterName)) {
+        Parameters.Add(new FixedValueParameter<ItemList<SingleSuccessorOperator>>(AfterExecutionOperatorsParameterName, "Actions that are executed after the execution of the operator", new ItemList<SingleSuccessorOperator>()));
+        AfterExecutionOperatorsParameter.Hidden = true;
+      }
+      #endregion
+    }
+
+    public sealed override IOperation Apply() {
+      var opCol = new OperationCollection();
+
+      //build before operations
+      foreach (var beforeAction in BeforeExecutionOperators) {
+        IOperation beforeActionOperation = ExecutionContext.CreateOperation(beforeAction);
+        opCol.Add(beforeActionOperation);
+      }
+      //build operation for the instrumented apply
+      opCol.Add(CreateInstrumentedOperation(this));
+      return opCol;
+    }
+
+    public virtual IOperation InstrumentedApply() {
+      var opCol = new OperationCollection();
+      foreach (var afterAction in AfterExecutionOperators) {
+        IOperation afterActionOperation = ExecutionContext.CreateOperation(afterAction);
+        opCol.Add(afterActionOperation);
+      }
+      if (Successor != null)
+        opCol.Add(ExecutionContext.CreateOperation(Successor));
+      return opCol;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Operators/3.3/Operator.InstrumentedOperatorWrapper.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators/3.3/Operator.InstrumentedOperatorWrapper.cs	(revision 10149)
+++ trunk/sources/HeuristicLab.Operators/3.3/Operator.InstrumentedOperatorWrapper.cs	(revision 10149)
@@ -0,0 +1,86 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using System;
+using System.Linq;
+using System.Threading;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using ExecutionContext = HeuristicLab.Core.ExecutionContext;
+
+namespace HeuristicLab.Operators {
+  public abstract partial class Operator {
+    internal static IOperation CreateInstrumentedOperation(InstrumentedOperator instrumentedOperator) {
+      var wrapper = new InstrumentedOperatorWrapper(instrumentedOperator);
+      return instrumentedOperator.ExecutionContext.CreateOperation(wrapper);
+    }
+
+    [StorableClass]
+    [NonDiscoverableType]
+    private class InstrumentedOperatorWrapper : Operator {
+      [Storable]
+      private readonly InstrumentedOperator instrumentedOperator;
+
+      [StorableConstructor]
+      private InstrumentedOperatorWrapper(bool deserializing) : base(deserializing) { }
+
+      private InstrumentedOperatorWrapper(InstrumentedOperatorWrapper original, Cloner cloner)
+        : base(original, cloner) {
+        instrumentedOperator = cloner.Clone(original.instrumentedOperator);
+      }
+
+      public override IDeepCloneable Clone(Cloner cloner) {
+        return new InstrumentedOperatorWrapper(this, cloner);
+      }
+
+      public InstrumentedOperatorWrapper(InstrumentedOperator instrumentedOperator)
+        : base() {
+        this.instrumentedOperator = instrumentedOperator;
+      }
+
+      public override IOperation Apply() {
+        throw new NotSupportedException("InstrumentedOperatorWrapper is not executeable.");
+      }
+
+      public override IOperation Execute(IExecutionContext context, CancellationToken cancellationToken) {
+        try {
+          //create new executionContext for the instrumented operation to account for parameter lookup and name translation
+          var executionContext = new ExecutionContext(context.Parent, instrumentedOperator, context.Scope);
+          instrumentedOperator.ExecutionContext = executionContext;
+          instrumentedOperator.cancellationToken = cancellationToken;
+          foreach (ILookupParameter param in instrumentedOperator.Parameters.OfType<ILookupParameter>())
+            param.ExecutionContext = executionContext;
+          IOperation next = instrumentedOperator.InstrumentedApply();
+          return next;
+        }
+        finally {
+          foreach (ILookupParameter param in instrumentedOperator.Parameters.OfType<ILookupParameter>())
+            param.ExecutionContext = null;
+          instrumentedOperator.ExecutionContext = null;
+        }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Operators/3.3/Operator.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators/3.3/Operator.cs	(revision 10037)
+++ trunk/sources/HeuristicLab.Operators/3.3/Operator.cs	(revision 10149)
@@ -34,5 +34,5 @@
   [Item("Operator", "Base class for operators.")]
   [StorableClass]
-  public abstract class Operator : ParameterizedNamedItem, IOperator, IStatefulItem {
+  public abstract partial class Operator : ParameterizedNamedItem, IOperator, IStatefulItem {
     public static new Image StaticItemImage {
       get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
