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


C# Enlistment.Done方法代码示例

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


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

示例1: StringBuilder

 /// <summary>
 /// Make the transacted changes permanent.
 /// </summary>
 void IEnlistmentNotification.Commit(Enlistment enlistment)
 {
     _value = new StringBuilder(_temporaryValue.ToString());
     _temporaryValue = null;
     _enlistedTransaction = null;
     enlistment.Done();
 }
开发者ID:40a,项目名称:PowerShell,代码行数:10,代码来源:TransactedString.cs

示例2: Commit

 /// <summary>
 /// Performs necessary commit actions, clearing the current <see cref="TransactionContext"/>
 /// </summary>
 public void Commit(Enlistment enlistment)
 {
     BeforeCommit();
     DoCommit();
     TransactionContext.Clear();
     enlistment.Done();
 }
开发者ID:plillevold,项目名称:Rebus,代码行数:10,代码来源:AmbientTransactionContext.cs

示例3: Commit

 public void Commit(Enlistment enlistment)
 {
     try
     {
         assertNotDisposed();
         logger.DebugFormat("Committing enlistment with id: {0}", Id);
         queueStorage.Global(actions =>
         {
             actions.RemoveReversalsMoveCompletedMessagesAndFinishSubQueueMove(Id);
             actions.MarkAsReadyToSend(Id);
             actions.DeleteRecoveryInformation(Id);
             actions.Commit();
         });
         enlistment.Done();
         logger.DebugFormat("Commited enlistment with id: {0}", Id);
     }
     catch (Exception e)
     {
         logger.Warn("Failed to commit enlistment " + Id, e);
         throw;
     }
     finally
     {
         onCompelete();
     }
 }
开发者ID:endeavour,项目名称:rhino-tools,代码行数:26,代码来源:TransactionEnlistment.cs

示例4: InDoubt

 public void InDoubt(Enlistment enlistment)
 {
     enlistment.Done();
     this.notification.InDoubt();
     Marshal.ReleaseComObject(this.notification);
     this.notification = null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:VoterBallot.cs

示例5: Rollback

 public void Rollback(Enlistment enlistment)
 {
     enlistment.Done();
     this.notification.Aborted(0, false, 0, 0);
     Marshal.ReleaseComObject(this.notification);
     this.notification = null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:VoterBallot.cs

示例6: Commit

 public void Commit(Enlistment enlistment)
 {
     log.Debug("Commit {0}, Messages: {1}", TransactionId, Messages.Count);
     if (_oncommit != null) _oncommit(this);
     enlistment.Done();
     TransactionOpen = false;
 }
开发者ID:BrettBailey,项目名称:nginn-messagebus,代码行数:7,代码来源:MessageBatchingRM.cs

示例7: Commit

 public void Commit(Enlistment enlistment)
 {
     enlistment.Done();
     this.notification.Committed(false, 0, 0);
     Marshal.ReleaseComObject(this.notification);
     this.notification = null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:VoterBallot.cs

示例8: Commit

			public void Commit(Enlistment enlistment)
			{
				if (_ThrowIt)
					Assert.Fail("commit is never called if prepare failed");

				enlistment.Done();
			}
开发者ID:hammett,项目名称:Castle.Transactions,代码行数:7,代码来源:WhoStoleMyTransaction_TestCase.cs

示例9: InDoubt

 public void InDoubt(Enlistment enlistment)
 {
     log.Warn("transaction in doubt {0}, messages {1}", TransactionId, this.Messages.Count);
     if (_onrollback != null) _onrollback(this);
     enlistment.Done();
     TransactionOpen = false;
 }
开发者ID:BrettBailey,项目名称:nginn-messagebus,代码行数:7,代码来源:MessageBatchingRM.cs

示例10: ApplicationException

		void IEnlistmentNotification.Commit(Enlistment enlistment)
		{
			if (_ThrowIt && ++_ErrorCount < 2)
				throw new ApplicationException("simulating resource failure");

			enlistment.Done();
		}
开发者ID:carcer,项目名称:Castle.Facilities.NHibernate,代码行数:7,代码来源:ThrowingResource.cs

示例11: StringBuilder

 void IEnlistmentNotification.Commit(Enlistment enlistment)
 {
     this.m_Value = new StringBuilder(this.m_TemporaryValue.ToString());
     this.m_TemporaryValue = null;
     this.enlistedTransaction = null;
     enlistment.Done();
 }
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:TransactedString.cs

示例12: Rollback

 public void Rollback(Enlistment enlistment)
 {
     foreach (var x in _rollbackCommands)
     {
         x();
     }
     enlistment.Done();
 }
开发者ID:JordanJones,项目名称:TransactionProofOfConcept,代码行数:8,代码来源:NoSqlResourceManager.cs

示例13: Commit

 /// <summary>
 /// Responds to the Commit notification.
 /// </summary>
 /// <param name="enlistment">An Enlistment that facilitates communication between the enlisted transaction participant and the transaction manager during the final phase of the transaction.</param>
 public override void Commit(Enlistment enlistment)
 {
     if (enlistment != null)
     {
         // Indicate that the transaction participant has completed its work.
         enlistment.Done();
     }
 }
开发者ID:jonnoking,项目名称:K2-PDF-Form-Brokers,代码行数:12,代码来源:ServiceBroker.cs

示例14: InDoubt

 public void InDoubt(Enlistment enlistment)
 {
     lock (_sharedLock)
     {
         if (InDoubtAction != null) InDoubtAction();
     }
     enlistment.Done();
 }
开发者ID:PaulStovell,项目名称:bindable,代码行数:8,代码来源:TransactionStep.cs

示例15: Commit

 public void Commit(Enlistment enlistment)
 {
     lock (_sharedLock)
     {
         if (CommitAction != null) CommitAction();
     }
     enlistment.Done();
 }
开发者ID:PaulStovell,项目名称:bindable,代码行数:8,代码来源:TransactionStep.cs


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