CompensatorOptions 枚举

指定一些标志,这些标志控制补偿资源管理器 (CRM) 补偿器应接收事务完成的哪些阶段,并且这些标志控制如果有问题的事务在尝试恢复后问题仍未解决则恢复是否应失败。

此枚举有一个 FlagsAttribute 属性,允许其成员值按位组合。

**命名空间:**System.EnterpriseServices.CompensatingResourceManager
**程序集:**System.EnterpriseServices(在 system.enterpriseservices.dll 中)

语法

声明
<SerializableAttribute> _
<FlagsAttribute> _
Public Enumeration CompensatorOptions
用法
Dim instance As CompensatorOptions
[SerializableAttribute] 
[FlagsAttribute] 
public enum CompensatorOptions
[SerializableAttribute] 
[FlagsAttribute] 
public enum class CompensatorOptions
/** @attribute SerializableAttribute() */ 
/** @attribute FlagsAttribute() */ 
public enum CompensatorOptions
SerializableAttribute 
FlagsAttribute 
public enum CompensatorOptions

成员

  成员名称 说明
AbortPhase 表示中断阶段。 
AllPhases 表示所有阶段。 
CommitPhase 表示提交阶段。 
FailIfInDoubtsRemain 如果有问题的事务在尝试恢复后问题仍未解决则失败。 
PreparePhase 表示准备阶段。 

示例

下面的代码示例演示如何使用此枚举。

' Create a new clerk using the AccountCompensator class.
Dim clerk As New Clerk(GetType(AccountCompensator), "An account transaction compensator", CompensatorOptions.AllPhases)
// Create a new clerk using the AccountCompensator class.
Clerk clerk = new Clerk(typeof(AccountCompensator),
  "An account transaction compensator", CompensatorOptions.AllPhases);
// Create a new clerk using the AccountCompensator class.
Clerk^ clerk = gcnew Clerk(AccountCompensator::typeid,
    "An account transaction compensator", CompensatorOptions::AllPhases);
// Create a new clerk using the AccountCompensator class.
Clerk clerk = new Clerk(AccountCompensator.class.ToType(),
    "An account transaction compensator",
    CompensatorOptions.AllPhases);

平台

Windows 98、Windows 2000 SP4、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

System.EnterpriseServices.CompensatingResourceManager 命名空间