Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (13 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs

    r4068 r4722  
    5050    }
    5151
     52    [StorableConstructor]
     53    private ExecutionContext(bool deserializing) { }
     54    private ExecutionContext(ExecutionContext original, Cloner cloner)
     55      : base(original, cloner) {
     56      parent = cloner.Clone(original.parent);
     57      parameterizedItem = cloner.Clone(original.parameterizedItem);
     58      scope = cloner.Clone(original.scope);
     59    }
    5260    private ExecutionContext() {
    5361      parent = null;
     
    6371
    6472    public override IDeepCloneable Clone(Cloner cloner) {
    65       ExecutionContext clone = new ExecutionContext();
    66       cloner.RegisterClonedObject(this, clone);
    67       clone.parent = (IExecutionContext)cloner.Clone(parent);
    68       clone.parameterizedItem = (IParameterizedItem)cloner.Clone(parameterizedItem);
    69       clone.scope = (IScope)cloner.Clone(scope);
    70       return clone;
     73      return new ExecutionContext(this, cloner);
    7174    }
    7275
Note: See TracChangeset for help on using the changeset viewer.