/// <inheritdoc/> public IQueryExecutor GetQueryExecutor(IQuery query) { var tuple = query as QueryTuple; if (tuple == null) { return(resolver_.GetQueryExecutor(query)); } return(tuple.Executor); }
/// <inheritdoc/> public bool Process(string name, IDictionary <string, string> data, out string result) { IQuery query_to_execute = resolver_.GetQuery(name); IQueryExecutor executor = resolver_.GetQueryExecutor(query_to_execute); if (!(executor is NoOpQueryExecutor)) { try { result = executor.Execute(query_to_execute, data); } catch (KeyNotFoundException key_not_found_exception) { result = key_not_found_exception.Message; } return(true); } result = string.Format(Resources.QueryProcessor_ProcessorNotFound, name); return(false); }