Share via


WebMethodAttribute コンストラクター

定義

WebMethodAttribute クラスの新しいインスタンスを初期化します。

オーバーロード

WebMethodAttribute()

WebMethodAttribute クラスの新しいインスタンスを初期化します。

WebMethodAttribute(Boolean)

WebMethodAttribute クラスの新しいインスタンスを初期化します。

WebMethodAttribute(Boolean, TransactionOption)

WebMethodAttribute クラスの新しいインスタンスを初期化します。

WebMethodAttribute(Boolean, TransactionOption, Int32)

WebMethodAttribute クラスの新しいインスタンスを初期化します。

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

WebMethodAttribute クラスの新しいインスタンスを初期化します。

WebMethodAttribute()

WebMethodAttribute クラスの新しいインスタンスを初期化します。

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

こちらもご覧ください

適用対象

WebMethodAttribute(Boolean)

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)

パラメーター

enableSession
Boolean

XML Web サービス メソッドに対してセッション状態が有効かどうかを初期化します。

適用対象

WebMethodAttribute(Boolean, TransactionOption)

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)

パラメーター

enableSession
Boolean

XML Web サービス メソッドに対してセッション状態が有効かどうかを初期化します。

transactionOption
TransactionOption

XML Web サービス メソッドのトランザクション サポートを初期化します。

注釈

HTTP プロトコルのステートレスな性質により、Web サービス呼び出しはトランザクションのルートにのみできます。 つまり、次の 2 つの設定は同等であり、呼び出しごとに新しいトランザクションが作成されます。

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

また、次のすべての設定が同等であることを意味します。トランザクションのサポートがないことを意味します。

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

適用対象

WebMethodAttribute(Boolean, TransactionOption, Int32)

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)

パラメーター

enableSession
Boolean

XML Web サービス メソッドに対してセッション状態が有効かどうかを初期化します。

transactionOption
TransactionOption

XML Web サービス メソッドのトランザクション サポートを初期化します。

cacheDuration
Int32

応答がキャッシュされる秒数を初期化します。

注釈

HTTP プロトコルのステートレスな性質により、Web サービス呼び出しはトランザクションのルートにのみできます。 つまり、次の 2 つの設定は同等であり、呼び出しごとに新しいトランザクションが作成されます。

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

また、次のすべての設定が同等であることを意味します。トランザクションのサポートがないことを意味します。

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

適用対象

WebMethodAttribute(Boolean, TransactionOption, Int32, Boolean)

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)

パラメーター

enableSession
Boolean

XML Web サービス メソッドに対してセッション状態が有効かどうかを初期化します。

transactionOption
TransactionOption

XML Web サービス メソッドのトランザクション サポートを初期化します。

cacheDuration
Int32

応答がキャッシュされる秒数を初期化します。

bufferResponse
Boolean

この要求に対する応答がバッファリングされるかどうかを初期化します。

注釈

HTTP プロトコルのステートレスな性質により、Web サービス呼び出しはトランザクションのルートにのみできます。 つまり、次の 2 つの設定は同等であり、呼び出しごとに新しいトランザクションが作成されます。

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

また、次のすべての設定が同等であることを意味します。トランザクションのサポートがないことを意味します。

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

適用対象