HostedEventProvider.SystemName Property
Gets or sets the name of the server on which the hosted event provider runs.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public Property SystemName As String
public string SystemName { get; set; }
public:
property String^ SystemName {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_SystemName ()
/** @property */
public void set_SystemName (String value)
public function get SystemName () : String
public function set SystemName (value : String)
Valeur de propriété
A String that specifies the server where the Notification Services engine runs the hosted event provider.
Notes
The following are not allowed as the system name: localhost, ., an IP address, or any string containing a backslash character.
In Notification Services Standard Edition, the application generator, distributors, and hosted event providers must all run on the same server. In Notification Services Enterprise Edition, the generator, distributors, and hosted event providers can be distributed on multiple systems.
Exemple
The following examples show how to define a hosted event provider, including the system name:
// Define a hosted event provider
HostedEventProvider flightEventProvider =
new HostedEventProvider(myApplication, "FlightEP");
flightEventProvider.ClassName = "FileSystemWatcherProvider";
flightEventProvider.SystemName = notificationServicesHost;
// Define event provider arguments
HostedEventProviderArgument fileArg_Directory =
new HostedEventProviderArgument(
flightEventProvider, "WatchDirectory");
fileArg_Directory.Value = sampleDirectory + @"\Events";
flightEventProvider.HostedEventProviderArguments.Add(
fileArg_Directory);
HostedEventProviderArgument fileArg_Schema =
new HostedEventProviderArgument(
flightEventProvider, "SchemaFile");
fileArg_Schema.Value = sampleDirectory +
@"\AppDefinition\EventsSchema.xsd";
flightEventProvider.HostedEventProviderArguments.Add(
fileArg_Schema);
HostedEventProviderArgument fileArg_EventClass =
new HostedEventProviderArgument(flightEventProvider,
"EventClassName");
fileArg_EventClass.Value = "FlightEvents";
flightEventProvider.HostedEventProviderArguments.Add(
fileArg_EventClass);
myApplication.HostedEventProviders.Add(flightEventProvider);
' Define a hosted event provider
Dim flightEventProvider As HostedEventProvider = _
New HostedEventProvider(myApplication, "FlightEP")
flightEventProvider.ClassName = "FileSystemWatcherProvider"
flightEventProvider.SystemName = notificationServicesHost
' Define event provider arguments
Dim fileArg_Directory As HostedEventProviderArgument = _
New HostedEventProviderArgument(flightEventProvider, _
"WatchDirectory")
fileArg_Directory.Value = sampleDirectory + "\Events"
flightEventProvider.HostedEventProviderArguments.Add( _
fileArg_Directory)
Dim fileArg_Schema As HostedEventProviderArgument = _
New HostedEventProviderArgument(flightEventProvider, _
"SchemaFile")
fileArg_Schema.Value = sampleDirectory + _
"\AppDefinition\EventsSchema.xsd"
flightEventProvider.HostedEventProviderArguments.Add( _
fileArg_Schema)
Dim fileArg_EventClass As HostedEventProviderArgument = _
New HostedEventProviderArgument(flightEventProvider, _
"EventClassName")
fileArg_EventClass.Value = "FlightEvents"
flightEventProvider.HostedEventProviderArguments.Add( _
fileArg_EventClass)
myApplication.HostedEventProviders.Add(flightEventProvider)
Sécurité des threads
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.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
HostedEventProvider Class
HostedEventProvider Members
Microsoft.SqlServer.Management.Nmo Namespace
Autres ressources
Définition de fournisseurs d'événements hébergés
SystemName Element for HostedProvider (ADF)