• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Transactions.InternalEnlistment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: EnterState

        internal override void EnterState(InternalEnlistment enlistment)
        {
            // Set the enlistment state
            enlistment.State = this;

            Monitor.Exit(enlistment.Transaction);
            try
            {
                TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
                if (etwLog.IsEnabled())
                {
                    etwLog.EnlistmentStatus(enlistment, NotificationCall.Rollback);
                }

                // Send the Rollback notification to the enlistment
                if (enlistment.SinglePhaseNotification != null)
                {
                    enlistment.SinglePhaseNotification.Rollback(enlistment.SinglePhaseEnlistment);
                }
                else
                {
                    enlistment.PromotableSinglePhaseNotification.Rollback(enlistment.SinglePhaseEnlistment);
                }
            }
            finally
            {
                Monitor.Enter(enlistment.Transaction);
            }
        }
开发者ID:dotnet,项目名称:corefx,代码行数:29,代码来源:DurableEnlistmentState.cs


示例2: EnterState

 internal override void EnterState(InternalEnlistment enlistment)
 {
     bool flag = false;
     enlistment.State = this;
     Monitor.Exit(enlistment.Transaction);
     try
     {
         if (DiagnosticTrace.Verbose)
         {
             EnlistmentNotificationCallTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), enlistment.EnlistmentTraceId, NotificationCall.SinglePhaseCommit);
         }
         if (enlistment.SinglePhaseNotification != null)
         {
             enlistment.SinglePhaseNotification.SinglePhaseCommit(enlistment.SinglePhaseEnlistment);
         }
         else
         {
             enlistment.PromotableSinglePhaseNotification.SinglePhaseCommit(enlistment.SinglePhaseEnlistment);
         }
         flag = true;
     }
     finally
     {
         if (!flag)
         {
             enlistment.SinglePhaseEnlistment.InDoubt();
         }
         Monitor.Enter(enlistment.Transaction);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:30,代码来源:DurableEnlistmentCommitting.cs


示例3: EnlistmentDone

        internal override void EnlistmentDone(InternalEnlistment enlistment)
        {
            // End this enlistment
            VolatileEnlistmentDone.EnterState(enlistment);

            // Note another enlistment finished.
            enlistment.FinishEnlistment();
        }
开发者ID:dotnet,项目名称:corefx,代码行数:8,代码来源:VolatileEnlistmentState.cs


示例4: Aborted

 internal override void Aborted(InternalEnlistment enlistment, Exception e)
 {
     if (enlistment.Transaction.innerException == null)
     {
         enlistment.Transaction.innerException = e;
     }
     DurableEnlistmentState._DurableEnlistmentEnded.EnterState(enlistment);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:DurableEnlistmentAborting.cs


示例5: ForceRollback

 internal override void ForceRollback(InternalEnlistment enlistment, Exception e)
 {
     VolatileEnlistmentState._VolatileEnlistmentEnded.EnterState(enlistment);
     if (enlistment.Transaction.innerException == null)
     {
         enlistment.Transaction.innerException = e;
     }
     enlistment.FinishEnlistment();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:VolatileEnlistmentPreparingAborting.cs


示例6: InDoubt

 internal override void InDoubt(InternalEnlistment enlistment, Exception e)
 {
     VolatileEnlistmentState._VolatileEnlistmentEnded.EnterState(enlistment);
     if (enlistment.Transaction.innerException == null)
     {
         enlistment.Transaction.innerException = e;
     }
     enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:VolatileEnlistmentSPC.cs


示例7: Aborted

 internal override void Aborted(InternalEnlistment enlistment, Exception e)
 {
     DurableEnlistmentState._DurableEnlistmentEnded.EnterState(enlistment);
     if (enlistment.Transaction.innerException == null)
     {
         enlistment.Transaction.innerException = e;
     }
     enlistment.Transaction.State.ChangeStatePromotedAborted(enlistment.Transaction);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:DurableEnlistmentDelegated.cs


示例8: Aborted

        internal override void Aborted(InternalEnlistment enlistment, Exception e)
        {
            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);
        }
开发者ID:dotnet,项目名称:corefx,代码行数:10,代码来源:DurableEnlistmentState.cs


示例9: Prepared

 internal override void Prepared(InternalEnlistment enlistment)
 {
     Monitor.Exit(enlistment.SyncRoot);
     try
     {
         enlistment.PromotedEnlistment.Prepared();
     }
     finally
     {
         Monitor.Enter(enlistment.SyncRoot);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:EnlistmentStatePromoted.cs


示例10: Aborted

 internal override void Aborted(InternalEnlistment enlistment, Exception e)
 {
     Monitor.Exit(enlistment.SyncRoot);
     try
     {
         enlistment.PromotedEnlistment.Aborted(e);
     }
     finally
     {
         Monitor.Enter(enlistment.SyncRoot);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:EnlistmentStatePromoted.cs


示例11: ForceRollback

 internal override void ForceRollback(InternalEnlistment enlistment, Exception e)
 {
     Monitor.Exit(enlistment.SyncRoot);
     try
     {
         enlistment.PromotedEnlistment.ForceRollback(e);
     }
     finally
     {
         Monitor.Enter(enlistment.SyncRoot);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:EnlistmentStatePromoted.cs


示例12: AddVolatileEnlistment

 protected void AddVolatileEnlistment(ref VolatileEnlistmentSet enlistments, Enlistment enlistment)
 {
     if (enlistments.volatileEnlistmentCount == enlistments.volatileEnlistmentSize)
     {
         InternalEnlistment[] destinationArray = new InternalEnlistment[enlistments.volatileEnlistmentSize + 8];
         if (enlistments.volatileEnlistmentSize > 0)
         {
             Array.Copy(enlistments.volatileEnlistments, destinationArray, enlistments.volatileEnlistmentSize);
         }
         enlistments.volatileEnlistmentSize += 8;
         enlistments.volatileEnlistments = destinationArray;
     }
     enlistments.volatileEnlistments[enlistments.volatileEnlistmentCount] = enlistment.InternalEnlistment;
     enlistments.volatileEnlistmentCount++;
     VolatileEnlistmentState._VolatileEnlistmentActive.EnterState(enlistments.volatileEnlistments[enlistments.volatileEnlistmentCount - 1]);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:TransactionState.cs


示例13: 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


示例14: EnterState

 internal override void EnterState(InternalEnlistment enlistment)
 {
     enlistment.State = this;
     Monitor.Exit(enlistment.Transaction);
     try
     {
         if (DiagnosticTrace.Verbose)
         {
             EnlistmentNotificationCallTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), enlistment.EnlistmentTraceId, NotificationCall.Prepare);
         }
         enlistment.EnlistmentNotification.Prepare(enlistment.PreparingEnlistment);
     }
     finally
     {
         Monitor.Enter(enlistment.Transaction);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:VolatileEnlistmentPreparing.cs


示例15: EnterState

        internal override void EnterState(InternalEnlistment enlistment)
        {
            // Set the enlistment state
            enlistment.State = this;

            Monitor.Exit(enlistment.Transaction);
            try // Don't hold this lock while calling into the application code.
            {
                TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
                if (etwLog.IsEnabled())
                {
                    etwLog.EnlistmentStatus(enlistment, NotificationCall.Rollback);
                }

                enlistment.EnlistmentNotification.Rollback(enlistment.SinglePhaseEnlistment);
            }
            finally
            {
                Monitor.Enter(enlistment.Transaction);
            }
        }
开发者ID:dotnet,项目名称:corefx,代码行数:21,代码来源:VolatileEnlistmentState.cs


示例16: EnterState

 internal override void EnterState(InternalEnlistment enlistment)
 {
     enlistment.State = this;
     Monitor.Exit(enlistment.Transaction);
     try
     {
         if (DiagnosticTrace.Verbose)
         {
             EnlistmentNotificationCallTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), enlistment.EnlistmentTraceId, NotificationCall.Rollback);
         }
         if (enlistment.SinglePhaseNotification != null)
         {
             enlistment.SinglePhaseNotification.Rollback(enlistment.SinglePhaseEnlistment);
         }
         else
         {
             enlistment.PromotableSinglePhaseNotification.Rollback(enlistment.SinglePhaseEnlistment);
         }
     }
     finally
     {
         Monitor.Enter(enlistment.Transaction);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:24,代码来源:DurableEnlistmentAborting.cs


示例17: InternalAborted

 internal override void InternalAborted(InternalEnlistment enlistment)
 {
     VolatileEnlistmentState._VolatileEnlistmentAborting.EnterState(enlistment);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:VolatileEnlistmentActive.cs


示例18: EnlistmentDone

 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     VolatileEnlistmentState._VolatileEnlistmentDone.EnterState(enlistment);
     enlistment.FinishEnlistment();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:VolatileEnlistmentActive.cs


示例19: EnterState

 internal override void EnterState(InternalEnlistment enlistment)
 {
     enlistment.State = this;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:VolatileEnlistmentActive.cs


示例20: EnlistmentInDoubt

        internal void EnlistmentInDoubt(InternalEnlistment enlistment)
        {
            Debug.Assert(enlistment != null, "Enlistment needed for the ETW event.");

            if (IsEnabled(EventLevel.Warning, ALL_KEYWORDS))
            {
                EnlistmentInDoubt(
                    enlistment.EnlistmentTraceId.EnlistmentIdentifier);
            }
        }
开发者ID:chcosta,项目名称:corefx,代码行数:10,代码来源:TransactionsEtwProvider.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Transactions.InternalTransaction类代码示例发布时间:2022-05-26
下一篇:
C# Transactions.Enlistment类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap