本文整理汇总了C#中System.Transactions.InternalEnlistment类的典型用法代码示例。如果您正苦于以下问题:C# InternalEnlistment类的具体用法?C# InternalEnlistment怎么用?C# InternalEnlistment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InternalEnlistment类属于System.Transactions命名空间,在下文中一共展示了InternalEnlistment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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();
}
示例4: Aborted
internal override void Aborted(InternalEnlistment enlistment, Exception e)
{
if (enlistment.Transaction.innerException == null)
{
enlistment.Transaction.innerException = e;
}
DurableEnlistmentState._DurableEnlistmentEnded.EnterState(enlistment);
}
示例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);
}
示例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);
}
示例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);
}
示例9: Prepared
internal override void Prepared(InternalEnlistment enlistment)
{
Monitor.Exit(enlistment.SyncRoot);
try
{
enlistment.PromotedEnlistment.Prepared();
}
finally
{
Monitor.Enter(enlistment.SyncRoot);
}
}
示例10: Aborted
internal override void Aborted(InternalEnlistment enlistment, Exception e)
{
Monitor.Exit(enlistment.SyncRoot);
try
{
enlistment.PromotedEnlistment.Aborted(e);
}
finally
{
Monitor.Enter(enlistment.SyncRoot);
}
}
示例11: ForceRollback
internal override void ForceRollback(InternalEnlistment enlistment, Exception e)
{
Monitor.Exit(enlistment.SyncRoot);
try
{
enlistment.PromotedEnlistment.ForceRollback(e);
}
finally
{
Monitor.Enter(enlistment.SyncRoot);
}
}
示例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]);
}
示例13: Enlistment
internal Enlistment(
Guid resourceManagerIdentifier,
InternalTransaction transaction,
IEnlistmentNotification twoPhaseNotifications,
ISinglePhaseNotification singlePhaseNotifications,
Transaction atomicTransaction)
{
_internalEnlistment = new DurableInternalEnlistment(
this,
resourceManagerIdentifier,
transaction,
twoPhaseNotifications,
singlePhaseNotifications,
atomicTransaction
);
}
示例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);
}
}