public void Execute(IBindingEnvironment environment) { Thread thread = new Thread(new ParameterizedThreadStart(this.ExecuteGo)); GoCommandParameter parameter = new GoCommandParameter() { Machine = Machine.Current, Environment = new LocalBindingEnvironment(environment) }; thread.IsBackground = true; thread.Start(parameter); }
private void ExecuteGo(object obj) { GoCommandParameter parameter = (GoCommandParameter)obj; parameter.Machine.SetCurrent(); this.command.Execute(parameter.Environment); }