예제 #1
0
            private IMessageEnvelope ProcessQuery(IDictionary <string, object> metadata, QueryExecuteRequest request)
            {
                try {
                    connector.AssertNotDisposed();
                    connector.AssertAuthenticated();

                    // TODO: use the timeout ...
                    var queryResonse = connector.ExecuteQuery(request.CommitId, request.Query);
                    return(connector.CreateEnvelope(metadata, new QueryExecuteResponse(queryResonse)));
                } catch (Exception ex) {
                    // TODO: Log the error ...
                    return(CreateErrorResponse(metadata, ex));
                }
            }
예제 #2
0
            private IMessageEnvelope ProcessQuery(IDictionary<string, object> metadata, QueryExecuteRequest request)
            {
                try {
                    connector.AssertNotDisposed();
                    connector.AssertAuthenticated();

                    // TODO: use the timeout ...
                    var queryResonse = connector.ExecuteQuery(request.CommitId, request.Query.Text, request.Query.Parameters);
                    return connector.CreateEnvelope(metadata, new QueryExecuteResponse(queryResonse));
                } catch (Exception ex) {
                    // TODO: Log the error ...
                    return CreateErrorResponse(metadata, ex);
                }
            }
            private IMessageEnvelope ProcessQuery(IDictionary <string, object> metadata, QueryExecuteRequest request)
            {
                try {
                    connector.AssertNotDisposed();
                    connector.AssertAuthenticated();

                    // TODO: use the timeout ...
                    var queryResonse = connector.ExecuteQuery(request.Query.Text, request.Query.Parameters);
                    return(connector.CreateEnvelope(metadata, new QueryExecuteResponse(queryResonse)));
                } catch (Exception ex) {
                    connector.Logger.Error(connector, "Error while processing a query request.");
                    connector.Logger.Error(connector, ex);
                    return(CreateErrorResponse(metadata, ex));
                }
            }