SqlNotificationRequest コンストラクター

定義

SqlNotificationRequest クラスの新しいインスタンスを作成します。

オーバーロード

SqlNotificationRequest()

既定値を使用して SqlNotificationRequest クラスの新しいインスタンスを作成します。

SqlNotificationRequest(String, String, Int32)

特定の通知要求、定義済みの SQL Server 2005 Service Broker のサービス名、および秒単位で計測されるタイムアウト期限を指定するユーザー定義の文字列を使用して、SqlNotificationRequest クラスの新しいインスタンスを作成します。

SqlNotificationRequest()

既定値を使用して SqlNotificationRequest クラスの新しいインスタンスを作成します。

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

注釈

パラメーターなしのコンストラクターを使用してオブジェクトをSqlNotificationRequest作成する場合、オブジェクトの UserData プロパティにオブジェクトをSqlCommandNotification割り当てる前に、そのインスタンスの プロパティと Options プロパティが初期化されている必要があります。 コンストラクターで使用される既定値は、 の場合は NULL (Nothing Visual Basic では ) UserData、の場合は空の文字列 Options、の場合は 0 Timeoutです。

こちらもご覧ください

適用対象

SqlNotificationRequest(String, String, Int32)

特定の通知要求、定義済みの SQL Server 2005 Service Broker のサービス名、および秒単位で計測されるタイムアウト期限を指定するユーザー定義の文字列を使用して、SqlNotificationRequest クラスの新しいインスタンスを作成します。

public:
 SqlNotificationRequest(System::String ^ userData, System::String ^ options, int timeout);
public SqlNotificationRequest (string userData, string options, int timeout);
new System.Data.Sql.SqlNotificationRequest : string * string * int -> System.Data.Sql.SqlNotificationRequest
Public Sub New (userData As String, options As String, timeout As Integer)

パラメーター

userData
String

この通知に対するアプリケーション固有の ID が含まれる文字列。 これは通知のインフラストラクチャでは使用されませんが、これによって通知をアプリケーション状態に関連付けることができます。 このパラメーターが示す値は、Service Broker のキュー メッセージに含まれます。

options
String

通知メッセージのポストが行われる Service Broker のサービス名が含まれる文字列。この文字列には、サービス名検索のスコープを特定のデータベースに制限するデータベース名、または Service Broker インスタンスの GUID が含まれる必要があります。

options パラメーターの形式の詳細については、Options のトピックを参照してください。

timeout
Int32

通知メッセージの待機時間 (秒)。

例外

options パラメーターの値が NULL です。

options パラメーターまたは userData パラメーターが uint16.MaxValue を超えているか、timeout パラメーター内の値が 0 未満です。

注釈

このコンストラクターを使用すると、独自の識別子、SQL Server 2005 Service Broker サービス名、タイムアウト値を指定して、新しいSqlNotificationRequestインスタンスを初期化できます。

こちらもご覧ください

適用対象