EnterpriseServicesInteropOption EnterpriseServicesInteropOption EnterpriseServicesInteropOption EnterpriseServicesInteropOption Enum


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

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


Automatic Automatic Automatic Automatic 1

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

Full Full Full 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 None None None 0

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


.NET Framework 允许托管的.NET 组件参与 COM + 事务中的类System.EnterpriseServices命名空间。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.