WebMethodAttribute Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

Przeciążenia

WebMethodAttribute()

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

WebMethodAttribute(Boolean)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

WebMethodAttribute(Boolean, TransactionOption)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

WebMethodAttribute(Boolean, TransactionOption)
WebMethodAttribute(Boolean, TransactionOption, Int32)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

WebMethodAttribute(Boolean, TransactionOption, Int32)
WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

WebMethodAttribute()

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

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

Zobacz też

Dotyczy

WebMethodAttribute(Boolean)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

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

Parametry

enableSession
Boolean

Inicjuje, czy stan sesji jest włączony dla metody usługi sieci Web XML.

Dotyczy

WebMethodAttribute(Boolean, TransactionOption)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

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)

Parametry

enableSession
Boolean

Inicjuje, czy stan sesji jest włączony dla metody usługi sieci Web XML.

transactionOption
TransactionOption

Inicjuje obsługę transakcji metody usługi sieci Web XML.

Uwagi

Wywołanie usługi internetowej może być tylko elementem głównym transakcji ze względu na bezstanowy charakter protokołu HTTP. Oznacza to, że następujące dwa ustawienia są równoważne z każdym wywołaniem tworzącym nową transakcję:

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

Oznacza to również, że wszystkie następujące ustawienia są równoważne; oznacza brak obsługi transakcji:

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

Dotyczy

WebMethodAttribute(Boolean, TransactionOption)

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

Parametry

enableSession
Boolean
transactionOption
TransactionOption

Dotyczy

WebMethodAttribute(Boolean, TransactionOption, Int32)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

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)

Parametry

enableSession
Boolean

Inicjuje, czy stan sesji jest włączony dla metody usługi sieci Web XML.

transactionOption
TransactionOption

Inicjuje obsługę transakcji metody usługi sieci Web XML.

cacheDuration
Int32

Inicjuje liczbę sekund buforowanych odpowiedzi.

Uwagi

Wywołanie usługi internetowej może być tylko elementem głównym transakcji ze względu na bezstanowy charakter protokołu HTTP. Oznacza to, że następujące dwa ustawienia są równoważne z każdym wywołaniem tworzącym nową transakcję:

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

Oznacza to również, że wszystkie następujące ustawienia są równoważne; oznacza brak obsługi transakcji:

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

Dotyczy

WebMethodAttribute(Boolean, TransactionOption, Int32)

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

Parametry

enableSession
Boolean
transactionOption
TransactionOption
cacheDuration
Int32

Dotyczy

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

Inicjuje nowe wystąpienie klasy WebMethodAttribute.

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)

Parametry

enableSession
Boolean

Inicjuje, czy stan sesji jest włączony dla metody usługi sieci Web XML.

transactionOption
TransactionOption

Inicjuje obsługę transakcji metody usługi sieci Web XML.

cacheDuration
Int32

Inicjuje liczbę sekund buforowanych odpowiedzi.

bufferResponse
Boolean

Inicjuje, czy odpowiedź na to żądanie jest buforowana.

Uwagi

Wywołanie usługi internetowej może być tylko elementem głównym transakcji ze względu na bezstanowy charakter protokołu HTTP. Oznacza to, że następujące dwa ustawienia są równoważne z każdym wywołaniem tworzącym nową transakcję:

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

Oznacza to również, że wszystkie następujące ustawienia są równoważne; oznacza brak obsługi transakcji:

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

Dotyczy

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

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

Parametry

enableSession
Boolean
transactionOption
TransactionOption
cacheDuration
Int32
bufferResponse
Boolean

Dotyczy