DeliveryChannelArgument Class

Represents one name/value pair for a delivery channel argument. These arguments are typically used to supply configuration and authentication information required by the delivery service.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in 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

Замечания

Delivery channel arguments are passed to the associated delivery protocol's Initialize method upon initialization.

Each delivery protocol specifies its own set of arguments. Examples of delivery channel arguments are the server name, a user name, and a password. For information about the arguments required by standard delivery protocols, see Стандартные протоколы доставки.

Notification Services does not validate delivery channel arguments when you create or update the instance of Notification Services.

Notification Services stores the argument names and values in the instance database. To encrypt the values stored in the database, configure argument encryption using the EncryptArguments property.

ms218803.note(ru-ru,SQL.90).gifВажно!
If you store user names and passwords in your source code, secure the source code.

Inheritance Hierarchy

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

Пример

The following examples show how to define a file delivery channel and its arguments:

// 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)

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

DeliveryChannelArgument Members
Microsoft.SqlServer.Management.Nmo Namespace

Другие ресурсы

Определение каналов доставки
Argument Element (ICF)