예제 #1
0
 public void RollbackTransaction(NativeSessionHandle sessionHandle)
 {
     try
     {
         _nativeServer.RollbackTransaction(sessionHandle);
     }
     catch (NativeCLIException exception)
     {
         throw new FaultException <NativeCLIFault>(NativeCLIFaultUtility.ExceptionToFault(exception), exception.Message);
     }
 }
예제 #2
0
 public void BeginTransaction(NativeSessionHandle sessionHandle, NativeIsolationLevel isolationLevel)
 {
     try
     {
         _nativeServer.BeginTransaction(sessionHandle, isolationLevel);
     }
     catch (NativeCLIException exception)
     {
         throw new FaultException <NativeCLIFault>(NativeCLIFaultUtility.ExceptionToFault(exception), exception.Message);
     }
 }
예제 #3
0
 public NativeSessionHandle StartSession(NativeSessionInfo sessionInfo)
 {
     try
     {
         return(_nativeServer.StartSession(sessionInfo));
     }
     catch (NativeCLIException exception)
     {
         throw new FaultException <NativeCLIFault>(NativeCLIFaultUtility.ExceptionToFault(exception), exception.Message);
     }
 }
예제 #4
0
 public NativeResult[] SessionExecuteStatements(NativeSessionHandle sessionHandle, NativeExecuteOperation[] operations)
 {
     try
     {
         return(_nativeServer.Execute(sessionHandle, operations));
     }
     catch (NativeCLIException exception)
     {
         throw new FaultException <NativeCLIFault>(NativeCLIFaultUtility.ExceptionToFault(exception), exception.Message);
     }
 }
예제 #5
0
 public NativeResult SessionExecuteStatement(NativeSessionHandle sessionHandle, string statement, NativeParam[] paramsValue, NativeExecutionOptions options)
 {
     try
     {
         return(_nativeServer.Execute(sessionHandle, statement, paramsValue, options));
     }
     catch (NativeCLIException exception)
     {
         throw new FaultException <NativeCLIFault>(NativeCLIFaultUtility.ExceptionToFault(exception), exception.Message);
     }
 }
예제 #6
0
 public int GetTransactionCount(NativeSessionHandle sessionHandle)
 {
     try
     {
         return(_nativeServer.GetTransactionCount(sessionHandle));
     }
     catch (NativeCLIException exception)
     {
         throw new FaultException <NativeCLIFault>(NativeCLIFaultUtility.ExceptionToFault(exception), exception.Message);
     }
 }
예제 #7
0
 public NativeResult[] Execute(NativeSessionInfo sessionInfo, NativeExecuteOperation[] operations)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginExecuteStatements(sessionInfo, operations, null, null);
         result.AsyncWaitHandle.WaitOne();
         return(channel.EndExecuteStatements(result));
     }
     catch (FaultException <NativeCLIFault> exception)
     {
         throw NativeCLIFaultUtility.FaultToException(exception.Detail);
     }
 }
예제 #8
0
 public NativeResult Execute(NativeSessionInfo sessionInfo, string statement, NativeParam[] paramsValue, NativeExecutionOptions options)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginExecuteStatement(sessionInfo, statement, paramsValue, options, null, null);
         result.AsyncWaitHandle.WaitOne();
         return(channel.EndExecuteStatement(result));
     }
     catch (FaultException <NativeCLIFault> exception)
     {
         throw NativeCLIFaultUtility.FaultToException(exception.Detail);
     }
 }
예제 #9
0
 public int GetTransactionCount(NativeSessionHandle sessionHandle)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginGetTransactionCount(sessionHandle, null, null);
         result.AsyncWaitHandle.WaitOne();
         return(channel.EndGetTransactionCount(result));
     }
     catch (FaultException <NativeCLIFault> exception)
     {
         throw NativeCLIFaultUtility.FaultToException(exception.Detail);
     }
 }
예제 #10
0
 public void RollbackTransaction(NativeSessionHandle sessionHandle)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginRollbackTransaction(sessionHandle, null, null);
         result.AsyncWaitHandle.WaitOne();
         channel.EndRollbackTransaction(result);
     }
     catch (FaultException <NativeCLIFault> exception)
     {
         throw NativeCLIFaultUtility.FaultToException(exception.Detail);
     }
 }
예제 #11
0
 public NativeSessionHandle StartSession(NativeSessionInfo sessionInfo)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginStartSession(sessionInfo, null, null);
         result.AsyncWaitHandle.WaitOne();
         return(channel.EndStartSession(result));
     }
     catch (FaultException <NativeCLIFault> exception)
     {
         throw NativeCLIFaultUtility.FaultToException(exception.Detail);
     }
 }