public object Clone() { var clonedState = new PackageEngineState(); /**/ if (this.CompiledDef != null) clonedState.CompiledDef = this.CompiledDef; // immutable //clonedState.CompiledDef = (CompiledModeDef) this.CompiledDef.Clone(); /**/ if (this.EngineContext != null) clonedState.EngineContext = (PackageEngineContext) this.EngineContext.Clone(); clonedState.Init(this._taskDescription, this.StoragePathBase); return clonedState; }
public object Clone() { var clonedState = new PackageEngineState(); /**/ if (this.CompiledDef != null) { clonedState.CompiledDef = this.CompiledDef; // immutable } //clonedState.CompiledDef = (CompiledModeDef) this.CompiledDef.Clone(); /**/ if (this.EngineContext != null) { clonedState.EngineContext = (PackageEngineContext)this.EngineContext.Clone(); } clonedState.Init(this._taskDescription, this.StoragePathBase); return(clonedState); }