ProtocolDefinitionCollection.Add Method
Adds a ProtocolDefinition to the ProtocolDefinitionCollection.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub Add ( _
protocolDefinition As ProtocolDefinition _
)
public void Add (
ProtocolDefinition protocolDefinition
)
public:
void Add (
ProtocolDefinition^ protocolDefinition
)
public void Add (
ProtocolDefinition protocolDefinition
)
public function Add (
protocolDefinition : ProtocolDefinition
)
Parameter
- protocolDefinition
The ProtocolDefinition to add to the collection.
Hinweise
Each ProtocolDefinition in the collection must have a unique name.
If you add a ProtocolDefinition after deploying the instance, you must Update the instance to apply the changes.
Beispiel
The following examples show how to declare a custom delivery protocol and add it to the collection of custom delivery protocols for an instance of Notification Services:
ProtocolDefinition customProtocol =
new ProtocolDefinition(myInstance, "MyCustomProtocol");
customProtocol.ClassName = "MyNamespace.MyProtocolClass";
customProtocol.AssemblyName = @"C:\NS\Full\MyCustomComponents.dll";
myInstance.ProtocolDefinitions.Add(customProtocol);
Dim customProtocol As ProtocolDefinition = _
New ProtocolDefinition(myInstance, "MyCustomProtocol")
customProtocol.ClassName = "MyNamespace.MyProtocolClass"
customProtocol.AssemblyName = _
"C:\NS\Full\MyCustomComponents.dll"
myInstance.ProtocolDefinitions.Add(customProtocol)
Threadsicherheit
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.
Plattformen
Entwicklungsplattformen
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Zielplattforme
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Siehe auch
Verweis
ProtocolDefinitionCollection Class
ProtocolDefinitionCollection Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
Definieren von benutzerdefinierten Übermittlungsprotokollen
Protocol Element (ICF)