ServicePoint.IdleSince Özellik

Tanım

Nesnenin bir konağa en son bağlandığı tarih ve saati ServicePoint alır.

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

Özellik Değeri

DateTime Nesnenin en son bağlandığı ServicePoint tarih ve saati içeren nesne.

Örnekler

Aşağıdaki kod örneği, nesnesinin IdleSince bir konağa en son bağlandığı tarih ve saati ServicePoint ayarlamak ve almak için özelliğini kullanır.

// 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()))

Açıklamalar

özelliği, IdleSince bir hizmet noktasının ana bilgisayarla bağlantısının kesildiği son tarihi ve saati kaydeder. Geçerli saat arasındaki fark ve IdleSince değerini MaxIdleTimeServicePoint aştığında, nesnesi başka bir bağlantıya geri dönüştürülebilir.

Şunlara uygulanır