当前位置: 首页>>代码示例>>C#>>正文


C# SinglePhaseEnlistment.Committed方法代码示例

本文整理汇总了C#中System.Transactions.SinglePhaseEnlistment.Committed方法的典型用法代码示例。如果您正苦于以下问题:C# SinglePhaseEnlistment.Committed方法的具体用法?C# SinglePhaseEnlistment.Committed怎么用?C# SinglePhaseEnlistment.Committed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Transactions.SinglePhaseEnlistment的用法示例。


在下文中一共展示了SinglePhaseEnlistment.Committed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SinglePhaseCommit

		/// <summary>
		/// Notifies an enlisted object that the transaction is being committed.
		/// </summary>
		/// <param name="singlePhaseEnlistment">A <see cref="T:System.Transactions.SinglePhaseEnlistment"/> interface used to send a response to the transaction manager.</param>
		public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
		{
			onTxComplete();

			session.Commit(GetLocalOrDistributedTransactionId(transaction));
			singlePhaseEnlistment.Committed();
		}
开发者ID:jtmueller,项目名称:ravendb,代码行数:11,代码来源:PromotableRavenClientEnlistment.cs

示例2: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment en)
 {
     if (en == null)
     {
         throw new ArgumentNullException("en");
     }
     try
     {
         this.handle.WaitOne();
     }
     catch (ObjectDisposedException)
     {
     }
     lock (this.syncRoot)
     {
         try
         {
             this.transaction.Commit();
             en.Committed();
         }
         catch (Exception exception)
         {
             en.Aborted(exception);
         }
         finally
         {
             if ((this.connection != null) && (this.connection.State != ConnectionState.Closed))
             {
                 this.connection.Close();
                 this.connection = null;
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:34,代码来源:LocalTransaction.cs

示例3: SinglePhaseCommit

    public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
    {
      simpleTransaction.Commit();
      singlePhaseEnlistment.Committed();
      DriverTransactionManager.RemoveDriverInTransaction(baseTransaction);

      if (connection.State == ConnectionState.Closed)
        connection.CloseFully();
    }
开发者ID:BjkGkh,项目名称:R106,代码行数:9,代码来源:MySqlPromotableTransaction.cs

示例4:

		void IPromotableSinglePhaseNotification.SinglePhaseCommit( SinglePhaseEnlistment singlePhaseEnlistment ) {
			this.simpleTransaction.Commit();
			singlePhaseEnlistment.Committed();
			DriverTransactionManager.RemoveDriverInTransaction( this.baseTransaction );
			this.connection.driver.CurrentTransaction = null;
			if( this.connection.State == ConnectionState.Closed ) {
				this.connection.CloseFully();
			}
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:9,代码来源:MySqlPromotableTransaction.cs

示例5: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     try
     {
         Neo4jTransaction.DoCommit(_transactionExecutionEnvironment);
         singlePhaseEnlistment.Committed();
     }
     finally
     {
         singlePhaseEnlistment.Aborted();
     }
 }
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:12,代码来源:Neo4jTransactionResourceManager.cs

示例6: SinglePhaseCommit

		public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
		{
			if (this.disposed)
			{
				return;
			}

			try
			{
				if (this.dataAccessObjectDataContext != null)
				{
					this.commandsContext = this.GetSqlTransactionalCommandsContext();

					this.dataAccessObjectDataContext.Commit(this.commandsContext, false);
					this.commandsContext.Commit();
				}

				singlePhaseEnlistment.Committed();
			}
			catch (Exception e)
			{
				ActionUtils.IgnoreExceptions(() => this.commandsContext.Rollback());

				singlePhaseEnlistment.Aborted(e);
			}
			finally
			{
				this.Dispose();
			}
		}
开发者ID:tumtumtum,项目名称:Shaolinq,代码行数:30,代码来源:TransactionContext.cs

示例7: SinglePhaseCommit

 public virtual void SinglePhaseCommit(SinglePhaseEnlistment enlistment)
 {
     enlistment.Committed();
     this.Completed();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:TransactionInstanceContextFacet.cs

示例8: SinglePhaseCommit

        /// <summary>
        /// Notifies an enlisted object that the transaction is being committed.
        /// </summary>
        /// <param name="singlePhaseEnlistment">A <see cref="SinglePhaseEnlistment"/>
        /// interface used to send a response to the transaction manager.
        /// </param>
        public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
        {
            m_dbTransaction.Commit();
            singlePhaseEnlistment.Committed();
            m_dbConnection.Enlistment = null;

            if (m_disposeConnection)
            {
                m_dbConnection.Dispose();
            }
        }
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:17,代码来源:HsqlEnlistment.cs

示例9: SinglePhaseCommit

        public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
        {
            try
            {
                DataAccessModelTransactionManager.currentlyCommitingTransaction = this.Transaction;

                this.dataAccessObjectDataContext?.Commit(this, false);

                foreach (var persistenceTransactionContext in this.persistenceTransactionContextsBySqlDatabaseContexts.Values)
                {
                    persistenceTransactionContext.sqlDatabaseCommandsContext.Commit();
                }

                singlePhaseEnlistment.Committed();
            }
            catch (Exception e)
            {
                foreach (var persistenceTransactionContext in this.persistenceTransactionContextsBySqlDatabaseContexts.Values)
                {
                    try
                    {
                        persistenceTransactionContext.sqlDatabaseCommandsContext.Rollback();
                    }
                    catch
                    {
                    }
                }

                singlePhaseEnlistment.Aborted(e);
            }
            finally
            {
                DataAccessModelTransactionManager.currentlyCommitingTransaction = null;

                this.Dispose();
            }
        }
开发者ID:ciker,项目名称:Shaolinq,代码行数:37,代码来源:TransactionContext.cs

示例10: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     _log.Debug("Single Phase Commit");
     if (_npgsqlTx != null)
     {
         _npgsqlTx.Commit();
         _npgsqlTx.Dispose();
         _npgsqlTx = null;
         singlePhaseEnlistment.Committed();
         _connection.PromotableLocalTransactionEnded();
     }
     else if (_callbacks != null)
     {
         if (_rm != null)
         {
             _rm.CommitWork(_callbacks.GetName());
             singlePhaseEnlistment.Committed();
         }
         else
         {
             _callbacks.CommitTransaction();
             singlePhaseEnlistment.Committed();
         }
         _callbacks = null;
     }
     _inTransaction = false;
 }
开发者ID:roji,项目名称:Npgsql,代码行数:27,代码来源:NpgsqlPromotableSinglePhaseNotification.cs

示例11: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     log.Debug("SinglePhaseCommit {0}", TransactionId);
     if (_onprepare != null) _onprepare(this);
     if (_oncommit != null) _oncommit(this);
     singlePhaseEnlistment.Committed();
     TransactionOpen = false;
 }
开发者ID:BrettBailey,项目名称:nginn-messagebus,代码行数:8,代码来源:MessageBatchingRM.cs

示例12: SinglePhaseCommit

            public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
            {
                this.Release();
                this.Dispose();

                singlePhaseEnlistment.Committed();
            }
开发者ID:WenningQiu,项目名称:appccelerate,代码行数:7,代码来源:PerTransactionScopeContext.cs

示例13: SinglePhaseCommit

		public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
		{
			if (_npgsqlTx != null)
			{
				_npgsqlTx.Commit();
				_npgsqlTx.Dispose();
				_npgsqlTx = null;
				singlePhaseEnlistment.Committed();
			}
			else if (_callbacks != null)
			{
				if (_rm != null)
				{
					_rm.CommitWork(_callbacks.GetName());
					singlePhaseEnlistment.Committed();
				}
				else
				{
					_callbacks.CommitTransaction();
					singlePhaseEnlistment.Committed();
				}
				_callbacks = null;
			}
			_inTransaction = false;
		}
开发者ID:dstimac,项目名称:revenj,代码行数:25,代码来源:NpgsqlPromotableSinglePhaseNotification.cs

示例14: SinglePhaseCommit

		public virtual void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
		{
			if (_SinglePhaseCommitCalled) throw new ApplicationException("single phase commit called before");
			_SinglePhaseCommitCalled = true;
			singlePhaseEnlistment.Committed();
		}
开发者ID:spiderjoe02,项目名称:Castle.Transactions,代码行数:6,代码来源:ResourceImpl.cs

示例15: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     sessionImpl.Commit(txId);
     singlePhaseEnlistment.Committed();
 }
开发者ID:kenegozi,项目名称:ravendb,代码行数:5,代码来源:RavenClientEnlistment.cs


注:本文中的System.Transactions.SinglePhaseEnlistment.Committed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。