ServicePoint.IdleSince Propriété

Définition

Obtient la date et l'heure de la dernière connexion de l'objet ServicePoint à un hôte.

public:
 property DateTime IdleSince { DateTime get(); };
public DateTime IdleSince { get; }
member this.IdleSince : DateTime
Public ReadOnly Property IdleSince As DateTime

Valeur de propriété

DateTime

Objet DateTime contenant la date et l'heure de la dernière connexion de l'objet ServicePoint.

Exemples

L’exemple de code suivant utilise la IdleSince propriété pour définir et récupérer la date et l’heure à laquelle l’objet a été connecté pour la ServicePoint dernière fois à un hôte.

// Display the date and time that the ServicePoint was last 
// connected to a host.
Console::WriteLine( "IdleSince = {0}", sp->IdleSince );

// Display the maximum length of time that the ServicePoint instance  
// is allowed to maintain an idle connection to an Internet  
// resource before it is recycled for use in another connection.
Console::WriteLine( "MaxIdleTime = {0}", sp->MaxIdleTime );
// Display the date and time that the ServicePoint was last
// connected to a host.
Console.WriteLine("IdleSince = " + sp.IdleSince.ToString());

// Display the maximum length of time that the ServicePoint instance
// is allowed to maintain an idle connection to an Internet
// resource before it is recycled for use in another connection.
Console.WriteLine("MaxIdleTime = " + sp.MaxIdleTime);
' Display the date and time that the ServicePoint was last 
' connected to a host.
Console.WriteLine(("IdleSince = " + sp.IdleSince.ToString()))


' Display the maximum length of time that the ServicePoint instance 
' is allowed to maintain an idle connection to an Internet  
' resource before it is recycled for use in another connection.
Console.WriteLine(("MaxIdleTime = " + sp.MaxIdleTime.ToString()))

Remarques

La IdleSince propriété enregistre la dernière date et l’heure à laquelle un point de service a été déconnecté d’un hôte. Lorsque la différence entre l’heure actuelle et IdleSince dépasse la valeur de MaxIdleTime, l’objet ServicePoint est disponible pour le recyclage vers une autre connexion.

S’applique à