private BenchmarkAlgorithm(BenchmarkAlgorithm original, Cloner cloner) { if (original.ExecutionState == ExecutionState.Started) { throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState)); } cloner.RegisterClonedObject(original, this); name = original.name; description = original.description; parameters = cloner.Clone(original.parameters); readOnlyParameters = null; executionState = original.executionState; executionTime = original.executionTime; storeAlgorithmInEachRun = original.storeAlgorithmInEachRun; runsCounter = original.runsCounter; Runs = cloner.Clone(original.runs); results = cloner.Clone(original.results); }
private BenchmarkAlgorithm(BenchmarkAlgorithm original, Cloner cloner) { if (original.ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState)); cloner.RegisterClonedObject(original, this); name = original.name; description = original.description; parameters = cloner.Clone(original.parameters); readOnlyParameters = null; executionState = original.executionState; executionTime = original.executionTime; storeAlgorithmInEachRun = original.storeAlgorithmInEachRun; runsCounter = original.runsCounter; Runs = cloner.Clone(original.runs); results = cloner.Clone(original.results); }