本文整理汇总了C#中System.Transactions.PreparingEnlistment.Done方法的典型用法代码示例。如果您正苦于以下问题:C# PreparingEnlistment.Done方法的具体用法?C# PreparingEnlistment.Done怎么用?C# PreparingEnlistment.Done使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Transactions.PreparingEnlistment
的用法示例。
在下文中一共展示了PreparingEnlistment.Done方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Prepare
public void Prepare(PreparingEnlistment preparingEnlistment)
{
lock (_sharedLock)
{
if (PrepareCommitAction != null) PrepareCommitAction();
}
preparingEnlistment.Done();
}
示例2: Prepare
public void Prepare(PreparingEnlistment preparingEnlistment)
{
if (commit)
{
preparingEnlistment.Prepared();
}
else
{
preparingEnlistment.ForceRollback();
// Rollback is not called after 'Rollback' vote
this.WasRollback = true;
preparingEnlistment.Done();
}
}
示例3: Prepare
public void Prepare(PreparingEnlistment preparingEnlistment)
{
preparingEnlistment.Done();
}
示例4: Prepare
public void Prepare(PreparingEnlistment preparingEnlistment)
{
Neo4jTransaction.DoKeepAlive(_transactionExecutionEnvironment);
preparingEnlistment.Done();
}
示例5: Prepare
public void Prepare(PreparingEnlistment preparingEnlistment)
{
// Abort if this happens before all messges are consumed
if (this.channel.State == CommunicationState.Opened && this.channel.InternalPendingItems > 0)
{
Exception e = DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.MsmqSessionChannelsMustBeClosed)));
preparingEnlistment.ForceRollback(e);
this.channel.Fault();
}
else
{
preparingEnlistment.Done();
}
}