Esempio n. 1
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);
     }
 }
Esempio n. 2
0
 public void BeginTransaction(NativeSessionHandle sessionHandle, NativeIsolationLevel isolationLevel)
 {
     try
     {
         GetNativeSession(sessionHandle).Process.BeginTransaction(NativeCLIUtility.NativeIsolationLevelToIsolationLevel(isolationLevel));
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 3
0
        public static IsolationLevel NativeIsolationLevelToIsolationLevel(NativeIsolationLevel isolationLevel)
        {
            switch (isolationLevel)
            {
            case NativeIsolationLevel.Browse: return(IsolationLevel.Browse);

            case NativeIsolationLevel.CursorStability: return(IsolationLevel.CursorStability);

            case NativeIsolationLevel.Isolated: return(IsolationLevel.Isolated);

            default: throw new ArgumentOutOfRangeException("AIsolationLevel");
            }
        }
Esempio n. 4
0
 public void BeginTransaction(NativeSessionHandle sessionHandle, NativeIsolationLevel isolationLevel)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginBeginTransaction(sessionHandle, isolationLevel, null, null);
         result.AsyncWaitHandle.WaitOne();
         channel.EndBeginTransaction(result);
     }
     catch (FaultException <NativeCLIFault> exception)
     {
         throw NativeCLIFaultUtility.FaultToException(exception.Detail);
     }
 }
Esempio n. 5
0
 public void BeginTransaction(NativeIsolationLevel isolationLevel)
 {
     _nativeCLI.BeginTransaction(_sessionHandle, isolationLevel);
 }