public TResult ExecuteQuery <TResult>(IQueryCommand <TResult> command) { var handler = dispatcher.GetHandler(command); if (handler == null) { throw new ArgumentNullException("handler"); } return((TResult)handler.Query(command)); }