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


C# Transaction.Clone方法代码示例

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


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

示例1: TransactionContext

        public TransactionContext(WorkflowServiceInstance durableInstance, Transaction currentTransaction)
        {
            Fx.Assert(durableInstance != null, "Null DurableInstance passed to TransactionContext.");
            Fx.Assert(currentTransaction != null, "Null Transaction passed to TransactionContext.");

            this.currentTransaction = currentTransaction.Clone();
            this.durableInstance = durableInstance;
            this.currentTransaction.EnlistVolatile(this, EnlistmentOptions.EnlistDuringPrepareRequired);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:TransactionContext.cs

示例2: InstancePersistenceContext

        internal InstancePersistenceContext(InstanceHandle handle, Transaction transaction)
            : this(handle)
        {
            Fx.Assert(transaction != null, "Null Transaction passed to InstancePersistenceContext.");

            // Let's take our own clone of the transaction. We need to do this because we might need to
            // create a TransactionScope using the transaction and in cases where we are dealing with a
            // transaction that is flowed into the workflow on a message, the DependentTransaction that the
            // dispatcher creates and sets to Transaction.Current may already be Completed by the time a
            // Save operation is done. And since TransactionScope creates a DependentTransaction, it won't
            // be able to.
            // We don't create another DependentClone because we are going to do a EnlistVolatile on the
            // transaction ourselves.
            this.transaction = transaction.Clone();
            IsHostTransaction = true;
            this.eventTraceActivity = handle.EventTraceActivity;
        }
开发者ID:uQr,项目名称:referencesource,代码行数:17,代码来源:InstancePersistenceContext.cs

示例3: TransactedRegistryKey

 private TransactedRegistryKey(SafeRegistryHandle hkey, bool writable, bool systemkey, Transaction transaction, SafeTransactionHandle txHandle)
 {
     this.hkey = hkey;
     this.keyName = "";
     if (systemkey)
     {
         this.state |= 2;
     }
     if (writable)
     {
         this.state |= 4;
     }
     if (null != transaction)
     {
         this.myTransaction = transaction.Clone();
         this.myTransactionHandle = txHandle;
     }
     else
     {
         this.myTransaction = null;
         this.myTransactionHandle = null;
     }
 }
开发者ID:nickchal,项目名称:pash,代码行数:23,代码来源:TransactedRegistryKey.cs

示例4: TransactionContext

 public TransactionContext(WorkflowServiceInstance durableInstance, Transaction currentTransaction)
 {
     this.currentTransaction = currentTransaction.Clone();
     this.durableInstance = durableInstance;
     this.currentTransaction.EnlistVolatile(this, EnlistmentOptions.EnlistDuringPrepareRequired);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:6,代码来源:TransactionContext.cs


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