HostingEnvironmentSection.ShutdownTimeout プロパティ

定義

アプリケーションを正常にシャットダウンする時間を秒単位で取得または設定します。

public:
 property TimeSpan ShutdownTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:00:30")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]
public TimeSpan ShutdownTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]
[<System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:00:30")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]
member this.ShutdownTimeout : TimeSpan with get, set
Public Property ShutdownTimeout As TimeSpan

プロパティ値

アプリケーションを正常にシャットダウンするための指定した秒数を示す TimeSpan 。 既定値は 30 秒です。

属性

次のコード例は、 ShutdownTimeout プロパティの使用方法を示しています。 このコード例は、 HostingEnvironmentSection クラスに提供されるより大きな例の一部です。

// Display ShutdownTimeout property
Console.WriteLine("Shutdown Timeout: {0}", configSection.ShutdownTimeout);
' Display the ShutdownTimeout property
Console.WriteLine("Shutdown Timeout: {0}", configSection.ShutdownTimeout)

注釈

ShutdownTimeout プロパティの既定値は 30 秒です。 この設定は、コンピューターまたはアプリケーション レベルで設定できます。 この設定が他の構成レベルで定義されている場合は無視されます。 デバッガーがアプリケーションにアタッチされている場合、アプリケーションはシャットダウンされません。

適用対象