EnterpriseServicesInteropOption 枚举


指定分布式事务与 COM+ 事务进行交互的方式。Specifies how distributed transactions interact with COM+ transactions.

public enum class EnterpriseServicesInteropOption
public enum EnterpriseServicesInteropOption
type EnterpriseServicesInteropOption = 
Public Enum EnterpriseServicesInteropOption


Automatic 1

搜索现有的 COM+ 上下文并与之同步(如果存在)。Search for an existing COM+ context and synchronize with it if one exists.

Full 2

System.EnterpriseServices 上下文(可以通过调用 ContextUtil 类的静态方法 Transaction 来检索)和 System.Transactions 环境事务(可通过调用 Transaction 类的静态方法 Current 来检索)始终保持同步。The System.EnterpriseServices context (which can be retrieved by calling the static method Transaction of the ContextUtil class) and the System.Transactions ambient transaction (which can be retrieved by calling the static method Current of the Transaction class) are always synchronized. 这将引入性能损失,因为可能需要创建新的 System.EnterpriseServices 上下文。This introduces a performance penalty because new System.EnterpriseServices contexts may need to be created.

None 0

TransactionCurrent 之间不同步。There is no synchronization between Transaction and Current.


.NET Framework 允许托管 .net 组件使用System.EnterpriseServices命名空间中的类参与 com + 事务。The .NET Framework allows managed .NET components to participate in COM+ transactions using the classes in the System.EnterpriseServices namespace. 不过, 由于默认情况下不提供互操作, 因此需要使用此枚举来指定要如何参与 COM + 上下文。However, since the interoperation is not provided by default, you need to use this enumeration to specify how you want to participate in the COM+ context. 具体而言, 当你创建新TransactionScope的时, 请使用此枚举来指示你希望事务参与 com + 事务的方式。Specifically, when you create a new TransactionScope, use this enumeration to indicate how you want your transaction to participate in COM+ transactions. 有关详细信息, 请参阅与企业服务和 COM + 事务的互操作性For more information, see Interoperability with Enterprise Services and COM+ Transactions.