WebMethodAttribute Constructors

Definitie

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

Overloads

Name Description
WebMethodAttribute()

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

WebMethodAttribute(Boolean)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

WebMethodAttribute(Boolean, TransactionOption)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

WebMethodAttribute(Boolean, TransactionOption, Int32)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

WebMethodAttribute()

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

public:
 WebMethodAttribute();
public WebMethodAttribute();
Public Sub New ()

Zie ook

Van toepassing op

WebMethodAttribute(Boolean)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

public:
 WebMethodAttribute(bool enableSession);
public WebMethodAttribute(bool enableSession);
new System.Web.Services.WebMethodAttribute : bool -> System.Web.Services.WebMethodAttribute
Public Sub New (enableSession As Boolean)

Parameters

enableSession
Boolean

Initialiseert of sessiestatus is ingeschakeld voor de XML-webservicemethode.

Van toepassing op

WebMethodAttribute(Boolean, TransactionOption)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

public:
 WebMethodAttribute(bool enableSession, System::EnterpriseServices::TransactionOption transactionOption);
public WebMethodAttribute(bool enableSession, System.EnterpriseServices.TransactionOption transactionOption);
new System.Web.Services.WebMethodAttribute : bool * System.EnterpriseServices.TransactionOption -> System.Web.Services.WebMethodAttribute
Public Sub New (enableSession As Boolean, transactionOption As TransactionOption)

Parameters

enableSession
Boolean

Initialiseert of sessiestatus is ingeschakeld voor de XML-webservicemethode.

transactionOption
TransactionOption

Initialiseert de transactieondersteuning van een XML-webservicemethode.

Opmerkingen

Een webservice-aanroep kan alleen de hoofdmap van een transactie zijn, vanwege de staatloze aard van het HTTP-protocol. Dit betekent dat de volgende twee instellingen gelijkwaardig zijn, waarbij elke aanroep een nieuwe transactie maakt:

[WebMethod(TransactionOption = TransactionOption.Required)]
[WebMethod(TransactionOption = TransactionOption.RequiresNew)]

Dit betekent ook dat alle volgende instellingen gelijkwaardig zijn; betekent geen transactieondersteuning:

[WebMethod] // TransactionOption.Disabled is the default
[WebMethod(TransactionOption = TransactionOption.Disabled)]
[WebMethod(TransactionOption = Transaction.NotSupported)]
[WebMethod(TransactionOption = Transaction.Supported)]

Van toepassing op

WebMethodAttribute(Boolean, TransactionOption, Int32)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

public:
 WebMethodAttribute(bool enableSession, System::EnterpriseServices::TransactionOption transactionOption, int cacheDuration);
public WebMethodAttribute(bool enableSession, System.EnterpriseServices.TransactionOption transactionOption, int cacheDuration);
new System.Web.Services.WebMethodAttribute : bool * System.EnterpriseServices.TransactionOption * int -> System.Web.Services.WebMethodAttribute
Public Sub New (enableSession As Boolean, transactionOption As TransactionOption, cacheDuration As Integer)

Parameters

enableSession
Boolean

Initialiseert of sessiestatus is ingeschakeld voor de XML-webservicemethode.

transactionOption
TransactionOption

Initialiseert de transactieondersteuning van een XML-webservicemethode.

cacheDuration
Int32

Initialiseert het aantal seconden dat het antwoord in de cache wordt opgeslagen.

Opmerkingen

Een webservice-aanroep kan alleen de hoofdmap van een transactie zijn, vanwege de staatloze aard van het HTTP-protocol. Dit betekent dat de volgende twee instellingen gelijkwaardig zijn, waarbij elke aanroep een nieuwe transactie maakt:

[WebMethod(TransactionOption = TransactionOption.Required)]
[WebMethod(TransactionOption = TransactionOption.RequiresNew)]

Dit betekent ook dat alle volgende instellingen gelijkwaardig zijn; betekent geen transactieondersteuning:

[WebMethod] // TransactionOption.Disabled is the default
[WebMethod(TransactionOption = TransactionOption.Disabled)]
[WebMethod(TransactionOption = Transaction.NotSupported)]
[WebMethod(TransactionOption = Transaction.Supported)]

Van toepassing op

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

Initialiseert een nieuw exemplaar van de WebMethodAttribute klasse.

public:
 WebMethodAttribute(bool enableSession, System::EnterpriseServices::TransactionOption transactionOption, int cacheDuration, bool bufferResponse);
public WebMethodAttribute(bool enableSession, System.EnterpriseServices.TransactionOption transactionOption, int cacheDuration, bool bufferResponse);
new System.Web.Services.WebMethodAttribute : bool * System.EnterpriseServices.TransactionOption * int * bool -> System.Web.Services.WebMethodAttribute
Public Sub New (enableSession As Boolean, transactionOption As TransactionOption, cacheDuration As Integer, bufferResponse As Boolean)

Parameters

enableSession
Boolean

Initialiseert of sessiestatus is ingeschakeld voor de XML-webservicemethode.

transactionOption
TransactionOption

Initialiseert de transactieondersteuning van een XML-webservicemethode.

cacheDuration
Int32

Initialiseert het aantal seconden dat het antwoord in de cache wordt opgeslagen.

bufferResponse
Boolean

Initialiseert of het antwoord voor deze aanvraag wordt gebufferd.

Opmerkingen

Een webservice-aanroep kan alleen de hoofdmap van een transactie zijn, vanwege de staatloze aard van het HTTP-protocol. Dit betekent dat de volgende twee instellingen gelijkwaardig zijn, waarbij elke aanroep een nieuwe transactie maakt:

[WebMethod(TransactionOption = TransactionOption.Required)]
[WebMethod(TransactionOption = TransactionOption.RequiresNew)]

Dit betekent ook dat alle volgende instellingen gelijkwaardig zijn; betekent geen transactieondersteuning:

[WebMethod] // TransactionOption.Disabled is the default
[WebMethod(TransactionOption = TransactionOption.Disabled)]
[WebMethod(TransactionOption = Transaction.NotSupported)]
[WebMethod(TransactionOption = Transaction.Supported)]

Van toepassing op