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


C# IEnlistmentNotification类代码示例

本文整理汇总了C#中IEnlistmentNotification的典型用法代码示例。如果您正苦于以下问题:C# IEnlistmentNotification类的具体用法?C# IEnlistmentNotification怎么用?C# IEnlistmentNotification使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: EnlistVolatile

		/// <summary>
		/// Enlists a resource manager in this transaction.
		/// </summary>
		/// <param name="p_entNotification">The resource manager to enlist.</param>
		/// <param name="p_eopOptions">The enlistment options. This value must be <see cref="EnlistmentOptions.None"/>.</param>
		/// <exception cref="ArgumentException">Thrown if <paramref name="p_eopOptions"/> is not
		/// <see cref="EnlistmentOptions.None"/>.</exception>
		public void EnlistVolatile(IEnlistmentNotification p_entResourceManager, EnlistmentOptions p_eopOptions)
		{
			if (p_eopOptions != EnlistmentOptions.None)
				throw new ArgumentException("EnlistmentOptions must be None.", "p_eopOptions");

			m_lstNotifications.Add(p_entResourceManager);
		}
开发者ID:NexusMods,项目名称:NexusModManager-4.5,代码行数:14,代码来源:Transaction.cs

示例2: InternalEnlistment

 internal InternalEnlistment(System.Transactions.Enlistment enlistment, IEnlistmentNotification twoPhaseNotifications, InternalTransaction transaction, System.Transactions.Transaction atomicTransaction)
 {
     this.enlistment = enlistment;
     this.twoPhaseNotifications = twoPhaseNotifications;
     this.transaction = transaction;
     this.atomicTransaction = atomicTransaction;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:InternalEnlistment.cs

示例3: TestInitialize

        public void TestInitialize()
        {
            target = new TransactionEnlistmentHelper();

            ensureTransaction = true;
            options = EnlistmentOptions.None;

            enlistmentNotification = MockRepository.GenerateMock<IEnlistmentNotification>();
            enlistmentNotification.Expect( en => en.Prepare( null ) )
                .IgnoreArguments()
                .WhenCalled( a =>
                {
                    PreparingEnlistment e = a.Arguments.GetValue( 0 ) as PreparingEnlistment;
                    e.Prepared();
                } )
                .Repeat.Once();

            enlistmentNotification.Expect( en => en.Commit( null ) )
                .IgnoreArguments()
                .WhenCalled( a =>
                {
                    Enlistment e = a.Arguments.GetValue( 0 ) as Enlistment;
                    e.Done();
                } )
                .Repeat.Once();
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:26,代码来源:TransactionEnlistmentHelperEventsTest.cs

示例4: InternalEnlistment

 // For Recovering Enlistments
 protected InternalEnlistment(
     Enlistment enlistment,
     IEnlistmentNotification twoPhaseNotifications
     )
 {
     Debug.Assert(this is RecoveringInternalEnlistment, "this is RecoveringInternalEnlistment");
     this.enlistment = enlistment;
     this.twoPhaseNotifications = twoPhaseNotifications;
     this.enlistmentId = 1;
     this.traceIdentifier = EnlistmentTraceIdentifier.Empty;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:12,代码来源:Enlistment.cs

示例5: Enlistment

 internal Enlistment(InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction, EnlistmentOptions enlistmentOptions)
 {
     if ((enlistmentOptions & EnlistmentOptions.EnlistDuringPrepareRequired) != EnlistmentOptions.None)
     {
         this.internalEnlistment = new System.Transactions.InternalEnlistment(this, transaction, twoPhaseNotifications, singlePhaseNotifications, atomicTransaction);
     }
     else
     {
         this.internalEnlistment = new Phase1VolatileEnlistment(this, transaction, twoPhaseNotifications, singlePhaseNotifications, atomicTransaction);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:Enlistment.cs

示例6: Enlistment

 internal Enlistment(
     Guid resourceManagerIdentifier,
     InternalTransaction transaction,
     IEnlistmentNotification twoPhaseNotifications,
     ISinglePhaseNotification singlePhaseNotifications,
     Transaction atomicTransaction)
 {
     _internalEnlistment = new DurableInternalEnlistment(
         this,
         resourceManagerIdentifier,
         transaction,
         twoPhaseNotifications,
         singlePhaseNotifications,
         atomicTransaction
         );
 }
开发者ID:dotnet,项目名称:corefx,代码行数:16,代码来源:Enlistment.cs

示例7: EnlistVolatile

 internal override Enlistment EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
 {
     Enlistment enlistment = new Enlistment(tx, enlistmentNotification, null, atomicTransaction, enlistmentOptions);
     if ((enlistmentOptions & EnlistmentOptions.EnlistDuringPrepareRequired) != EnlistmentOptions.None)
     {
         base.AddVolatileEnlistment(ref tx.phase0Volatiles, enlistment);
     }
     else
     {
         base.AddVolatileEnlistment(ref tx.phase1Volatiles, enlistment);
     }
     if (DiagnosticTrace.Information)
     {
         EnlistmentTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), enlistment.InternalEnlistment.EnlistmentTraceId, EnlistmentType.Volatile, enlistmentOptions);
     }
     return enlistment;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:TransactionStatePhase0.cs

示例8: EnlistVolatile

 public Enlistment EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
 {
 }
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:3,代码来源:SubordinateTransaction.cs

示例9: EnlistVolatile

 internal virtual Enlistment EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
 {
     throw TransactionException.CreateTransactionStateException(System.Transactions.SR.GetString("TraceSourceLtm"), tx.innerException);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:TransactionState.cs

示例10: EnlistDurable

 public Enlistment EnlistDurable(System.Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
 {
 }
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:3,代码来源:SubordinateTransaction.cs

示例11: Enlistment

 internal Enlistment(
     IEnlistmentNotification twoPhaseNotifications,
     object syncRoot
     )
 {
     this.internalEnlistment = new RecoveringInternalEnlistment(
         this,
         twoPhaseNotifications,
         syncRoot
         );
 }
开发者ID:mind0n,项目名称:hive,代码行数:11,代码来源:Enlistment.cs

示例12: PreparingEnlistment

		internal PreparingEnlistment (Transaction tx, IEnlistmentNotification enlisted)
		{
			this.tx = tx;
			this.enlisted = enlisted;
			waitHandle = new ManualResetEvent (false);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:6,代码来源:PreparingEnlistment.cs

示例13: EnlistVolatileInternal

		private Enlistment EnlistVolatileInternal (
			IEnlistmentNotification notification,
			EnlistmentOptions options)
		{
			EnsureIncompleteCurrentScope (); 
			/* FIXME: Handle options.EnlistDuringPrepareRequired */
			Volatiles.Add (notification);

			/* FIXME: Enlistment.. ? */
			return new Enlistment ();
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Transaction.cs

示例14: Rollback

		internal void Rollback (Exception ex, IEnlistmentNotification enlisted)
		{
			if (aborted)
				return;

			/* See test ExplicitTransaction7 */
			if (info.Status == TransactionStatus.Committed)
				throw new TransactionException ("Transaction has already been committed. Cannot accept any new work.");

			innerException = ex;
			Enlistment e = new Enlistment ();
			foreach (IEnlistmentNotification prep in volatiles)
				if (prep != enlisted)
					prep.Rollback (e);

			if (durables.Count > 0 && durables [0] != enlisted)
				durables [0].Rollback (e);

			Aborted = true;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:20,代码来源:Transaction.cs

示例15: DurableInternalEnlistment

 protected DurableInternalEnlistment(
     Enlistment enlistment,
     IEnlistmentNotification twoPhaseNotifications
     ) : base(enlistment, twoPhaseNotifications)
 {
 }
开发者ID:mind0n,项目名称:hive,代码行数:6,代码来源:Enlistment.cs


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