Partager via


HostedEventProvider.Timeout Property

Gets or sets the database connection time-out for the hosted event provider.

Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Property Timeout As TimeSpan
public TimeSpan Timeout { get; set; }
public:
property TimeSpan Timeout {
    TimeSpan get ();
    void set (TimeSpan value);
}
/** @property */
public TimeSpan get_Timeout ()

/** @property */
public void set_Timeout (TimeSpan value)
public function get Timeout () : TimeSpan

public function set Timeout (value : TimeSpan)

Valeur de propriété

A TimeSpan object specifying the connection time-out for the hosted event provider.

Notes

The default time-out for hosted event providers is 5 minutes. If using the default constructor, you must set the time-out value.

Exemple

The following example shows how to define a hosted provider time-out of 5 minutes:

// Define a hosted event provider and set properties.
HostedEventProvider flightEventProvider = new HostedEventProvider();
flightEventProvider.Parent = myApplication;
flightEventProvider.Name = "FlightEP";
flightEventProvider.StartTime = DateTime.MinValue;
flightEventProvider.Timeout = new TimeSpan(0, 5, 0);
flightEventProvider.ClassName = "FileSystemWatcherProvider";
flightEventProvider.AssemblyName = "";
flightEventProvider.SystemName = notificationServicesHost;
' Define a hosted event provider and set properties.
Dim flightEventProvider As HostedEventProvider = _
    New HostedEventProvider()
flightEventProvider.Parent = myApplication
flightEventProvider.Name = "FlightEP"
flightEventProvider.StartTime = DateTime.MinValue
flightEventProvider.Timeout = New TimeSpan(0, 5, 0)
flightEventProvider.ClassName = "FileSystemWatcherProvider"
flightEventProvider.AssemblyName = ""
flightEventProvider.SystemName = notificationServicesHost

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
ProviderTimeout Element (ADF)