ServicePoint.IdleSince Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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é
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 de la dernière connexion de l’objet ServicePoint à 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 date et l’heure de la dernière déconnexion d’un point de service d’un hôte. Lorsque la différence entre l’heure actuelle et IdleSince dépasse la valeur de MaxIdleTime, l’objet ServicePoint peut être recyclé vers une autre connexion.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour