ServicePoint.IdleSince Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Získá datum a čas, kdy byl objekt naposledy ServicePoint připojen k hostiteli.
public:
property DateTime IdleSince { DateTime get(); };
public DateTime IdleSince { get; }
member this.IdleSince : DateTime
Public ReadOnly Property IdleSince As DateTime
Hodnota vlastnosti
Objekt DateTime obsahující datum a čas, kdy byl objekt naposledy ServicePoint připojen.
Příklady
Následující příklad kódu používá IdleSince vlastnost k nastavení a načtení data a času, kdy ServicePoint byl objekt naposledy připojen k hostiteli.
// 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()))
Poznámky
Vlastnost IdleSince zaznamenává poslední datum a čas, kdy byl bod služby odpojen od hostitele. Pokud rozdíl mezi aktuálním časem a IdleSince překročí hodnotu MaxIdleTime, ServicePoint objekt je k dispozici pro recyklaci do jiného připojení.
Platí pro
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro