Instance.DeliveryChannels Property
Gets the collection of delivery channels for the Notification Services instance.
네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public ReadOnly Property DeliveryChannels As DeliveryChannelCollection
public DeliveryChannelCollection DeliveryChannels { get; }
public:
property DeliveryChannelCollection^ DeliveryChannels {
DeliveryChannelCollection^ get ();
}
/** @property */
public DeliveryChannelCollection get_DeliveryChannels ()
public function get DeliveryChannels () : DeliveryChannelCollection
속성 값
The DeliveryChannelCollection for the Instance.
주의
A delivery channel represents a specific delivery endpoint, such as an Simple Mail Transfer Protocol (SMTP) server. Each delivery channel is based on a delivery protocol, either standard or custom, and defines an instance of the use of a delivery protocol to deliver notifications.
Delivery channels are associated with subscriptions by using a subscriber device. For example, when a subscriber selects to receive notifications on a cell phone, the cell phone subscriber device has an associated delivery channel that is configured to use the short message service (SMS) delivery protocol.
You must have at least one delivery channel for each delivery protocol your applications use to deliver notifications. This includes the standard SMTP and File delivery protocols and any custom protocols.
예
The following examples show how to define a standard delivery channel for an instance of Notification Services and then add the delivery channel to the instance using this property:
// 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.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
Instance Class
Instance Members
Microsoft.SqlServer.Management.Nmo Namespace
관련 자료
Notification Services 인스턴스 구성
DeliveryChannels Element (ICF)