Condividi tramite


ChannelDispatcher.IsTransactedAccept Proprietà

Definizione

Ottiene un valore che indica se le chiamate del metodo Accept al listener vengono eseguite nell'ambito di una transazione.

public:
 property bool IsTransactedAccept { bool get(); };
public bool IsTransactedAccept { get; }
member this.IsTransactedAccept : bool
Public ReadOnly Property IsTransactedAccept As Boolean

Valore della proprietà

Boolean

true se le chiamate del metodo Accept al listener vengono eseguite nell'ambito di una transazione. In caso contrario, false.

Esempio

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

Si applica a