コード例 #1
0
        public void CloseCursor(IRemoteServerCursor cursor, ProcessCallInfo callInfo)
        {
            ClientExpressionPlan plan = (ClientExpressionPlan)cursor.Plan;

            plan.Close(cursor, callInfo);
            UnprepareExpression(plan);
        }
コード例 #2
0
 public IRemoteServerCursor OpenCursor(string expression, ref RemoteParamData paramsValue, out IRemoteServerExpressionPlan plan, out PlanDescriptor planDescriptor, out ProgramStatistics executeTime, ProcessCallInfo callInfo, RemoteProcessCleanupInfo cleanupInfo, out Guid[] bookmarks, int count, out RemoteFetchData fetchData)
 {
     try
     {
         var          channel = GetServiceInterface();
         IAsyncResult result  = channel.BeginOpenCursorWithFetch(ProcessHandle, GetCleanupInfo(cleanupInfo), callInfo, expression, paramsValue, count, null, null);
         result.AsyncWaitHandle.WaitOne();
         DirectCursorWithFetchResult cursorResult = channel.EndOpenCursorWithFetch(result);
         paramsValue.Data = cursorResult.ParamData;
         planDescriptor   = cursorResult.PlanDescriptor;
         executeTime      = cursorResult.ExecuteTime;
         bookmarks        = cursorResult.Bookmarks;
         fetchData        = cursorResult.FetchData;
         plan             = new ClientExpressionPlan(this, planDescriptor);
         return(new ClientCursor((ClientExpressionPlan)plan, cursorResult.CursorDescriptor));
     }
     catch (FaultException <DataphorFault> fault)
     {
         throw DataphorFaultUtility.FaultToException(fault.Detail);
     }
     catch (CommunicationException ce)
     {
         ReportCommunicationError();
         throw new ServerException(ServerException.Codes.CommunicationFailure, ErrorSeverity.Environment, ce);
     }
 }
コード例 #3
0
 public byte[] Evaluate(string expression, ref RemoteParamData paramsValue, out IRemoteServerExpressionPlan plan, out PlanDescriptor planDescriptor, out ProgramStatistics executeTime, ProcessCallInfo callInfo, RemoteProcessCleanupInfo cleanupInfo)
 {
     try
     {
         var          channel = GetServiceInterface();
         IAsyncResult result  = channel.BeginEvaluateExpression(ProcessHandle, GetCleanupInfo(cleanupInfo), callInfo, expression, paramsValue, null, null);
         result.AsyncWaitHandle.WaitOne();
         DirectEvaluateResult evaluateResult = channel.EndEvaluateExpression(result);
         paramsValue.Data = evaluateResult.ParamData;
         planDescriptor   = evaluateResult.PlanDescriptor;
         executeTime      = evaluateResult.ExecuteTime;
         plan             = new ClientExpressionPlan(this, planDescriptor);
         return(evaluateResult.Result);
     }
     catch (FaultException <DataphorFault> fault)
     {
         throw DataphorFaultUtility.FaultToException(fault.Detail);
     }
     catch (CommunicationException ce)
     {
         ReportCommunicationError();
         throw new ServerException(ServerException.Codes.CommunicationFailure, ErrorSeverity.Environment, ce);
     }
 }
コード例 #4
0
 public void Close()
 {
     ClientExpressionPlan.Close(this, ProcessCallInfo.Empty);
 }
コード例 #5
0
 public ClientCursor(ClientExpressionPlan clientExpressionPlan, CursorDescriptor cursorDescriptor)
 {
     _clientExpressionPlan = clientExpressionPlan;
     _cursorDescriptor     = cursorDescriptor;
 }