ServicePoint.IdleSince Vlastnost

Definice

Získá datum a čas, kdy ServicePoint byl objekt naposledy 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

DateTime

Objekt DateTime , který obsahuje datum a čas, ServicePoint kdy byl objekt naposledy 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 je objekt k dispozici pro recyklaci jiného připojení.

Platí pro