ServicePoint.IdleSince プロパティ
アセンブリ: System (system.dll 内)

ServicePoint オブジェクトが最後に接続した日付と時刻を格納している DateTime オブジェクト。

IdleSince プロパティは、サービス ポイントが最後にホストから切断された日付と時刻を記録します。現在の時刻と IdleSince との間の差が MaxIdleTime の値を超えている場合、ServicePoint オブジェクトは別の接続で再利用できます。

IdleSince プロパティを使用して、ServicePoint オブジェクトが最後にホストに接続した日付と時刻を設定および取得するコード例を次に示します。
' 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()))
// 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 = {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.get_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.get_MaxIdleTime()));

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- ServicePoint.IdleSince プロパティのページへのリンク