public IResult Execute(ExecuteStepCommand executeStepCommand) { var output = executeStepCommand.FindStepAndExecute(this); var result = output as IResult; return result ?? Execute((ExecuteStepCommand)output); }
public SearchResult ExecuteSearch(Dictionary<string, string> searchTerms) { if (searchTerms == null) throw new ArgumentNullException("searchTerms"); var start = new ExecuteStepCommand<ParseSearchTermsStep, Dictionary<string, string>>(searchTerms); var result = _host.Execute(start); var errorResult = result as ErrorResult; if (errorResult != null) { throw new Exception(errorResult.Message); } return (SearchResult)result; }