public ISequenceDataContainer Clone() { SequenceParameterInfo parameterInfo = new SequenceParameterInfo() { CreateTime = DateTime.Now, Hash = string.Empty, Modified = false, ModifiedTime = DateTime.Now, Path = string.Empty, Version = this.Info.Version }; VariableInitValueCollection initValueCollection = new VariableInitValueCollection(); ModuleUtils.CloneDataCollection(this.VariableValues, initValueCollection); SequenceParameterCollection sequenceParameterCollection = new SequenceParameterCollection(); ModuleUtils.CloneDataCollection(this.SequenceParameters, sequenceParameterCollection); SequenceGroupParameter parameter = new SequenceGroupParameter() { Info = parameterInfo, VariableValues = initValueCollection, SetUpParameters = this.SetUpParameters.Clone() as ISequenceParameter, SequenceParameters = sequenceParameterCollection, TearDownParameters = this.TearDownParameters.Clone() as ISequenceParameter, }; return parameter; }
public ISequenceDataContainer Clone() { SequenceStepParameterCollection subStepParameters = null; if (null != this.SubStepParameters) { subStepParameters = new SequenceStepParameterCollection(); ModuleUtils.CloneDataCollection(this.SubStepParameters, subStepParameters); } ParameterDataCollection dataCollection = null; if (null != Parameters) { dataCollection = new ParameterDataCollection(); ModuleUtils.CloneCollection(Parameters, dataCollection); } SequenceStepParameter stepParameter = new SequenceStepParameter() { Index = Constants.UnverifiedIndex, SubStepParameters = subStepParameters, Parameters = dataCollection, Instance = string.Empty, Return = string.Empty }; return(stepParameter); }
public IExpressionData Clone() { List <IExpressionElement> copyedArguments = new List <IExpressionElement>(this.Arguments.Count); ModuleUtils.CloneDataCollection(this.Arguments, copyedArguments); ExpressionData data = new ExpressionData(this.Arguments.Count) { Name = string.Empty, Operation = this.Operation, Source = (IExpressionElement)Source.Clone(), Arguments = copyedArguments }; return(data); }