ChannelDispatcher.IsTransactedAccept 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示对侦听程序的接受方法调用是否在事务中完成。
public:
property bool IsTransactedAccept { bool get(); };
public bool IsTransactedAccept { get; }
member this.IsTransactedAccept : bool
Public ReadOnly Property IsTransactedAccept As Boolean
属性值
如果对侦听程序的接受方法调用是在事务中完成,则为 true
;否则为 false
。
示例
Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
serviceHost.AddServiceEndpoint(
typeof(ICalculator),
new WSHttpBinding(),
"CalculatorServiceObject");
serviceHost.Open();
ChannelDispatcher dispatcher = (ChannelDispatcher)serviceHost.ChannelDispatchers[0];
bool isTransactedAccept = dispatcher.IsTransactedAccept;
Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)
serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")
serviceHost.Open()
Dim dispatcher As ChannelDispatcher = CType(serviceHost.ChannelDispatchers(0), ChannelDispatcher)
Dim isTransactedAccept As Boolean = dispatcher.IsTransactedAccept