Share via


DeliveryChannelArgument Class

配信チャネル引数を名前/値ペアとして表します。通常、これらの引数は、配信サービスに必要な構成情報と認証情報を提供するために使用されます。

名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (microsoft.sqlserver.smo.dll 内)

構文

'宣言
Public NotInheritable Class DeliveryChannelArgument
    Inherits NamedSmoObject
public sealed class DeliveryChannelArgument : NamedSmoObject
public ref class DeliveryChannelArgument sealed : public NamedSmoObject
public final class DeliveryChannelArgument extends NamedSmoObject
public final class DeliveryChannelArgument extends NamedSmoObject

解説

配信チャネル引数は、初期化時に、関連付けられた配信プロトコルの Initialize メソッドに渡されます。

各配信プロトコルは、独自の引数のセットを指定します。配信チャネル引数の例としては、サーバー名、ユーザー名、およびパスワードがあります。標準配信プロトコルに必要な引数については、「標準配信プロトコル」を参照してください。

Notification Services のインスタンスの作成時や更新時に、配信チャネル引数が Notification Services によって検証されることはありません。

引数の名前と値は、Notification Services によってインスタンス データベースに格納されます。データベースに格納された値を暗号化するには、EncryptArguments プロパティを使用して、引数の暗号化を構成します。

ms218803.note(ja-jp,SQL.90).gif重要 :
ユーザー名とパスワードをソース コード内に格納する場合、ソース コードをセキュリティで保護します。

継承階層

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Nmo.DeliveryChannelArgument

使用例

次の例は、ファイル配信チャネルとその引数を定義する方法を示しています。

// Define a delivery channel that uses the built-in File protocol
DeliveryChannel fileChannel = 
    new DeliveryChannel(myInstance, "FileChannel");
fileChannel.ProtocolName = "File";

// Define and add arguments for the file delivery channel
DeliveryChannelArgument fileNameArg = 
    new DeliveryChannelArgument(fileChannel, "FileName");
fileNameArg.Value = sampleDirectory + 
    @"\Notifications\FileNotifications.txt";
fileChannel.DeliveryChannelArguments.Add(fileNameArg);

// Add the file delivery channel to the instance
myInstance.DeliveryChannels.Add(fileChannel);
' Define a delivery channel using the built-in File protocol
Dim fileChannel As DeliveryChannel = _
    New DeliveryChannel(myInstance, "FileChannel")
fileChannel.ProtocolName = "File"

' Define and add arguments for the file delivery channel
Dim fileNameArg As DeliveryChannelArgument = _
    New DeliveryChannelArgument(fileChannel, "FileName")
fileNameArg.Value = sampleDirectory + _
    "\Notifications\FileNotifications.txt"
fileChannel.DeliveryChannelArguments.Add(fileNameArg)

' Add the file delivery channel to the instance
myInstance.DeliveryChannels.Add(fileChannel)

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

DeliveryChannelArgument Members
Microsoft.SqlServer.Management.Nmo Namespace

その他の技術情報

配信チャネルの定義
Argument 要素 (ICF)