Share via


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 秒です。 この設定は、コンピューターまたはアプリケーション レベルで設定できます。 この設定が他の構成レベルで定義されている場合は無視されます。 デバッガーがアプリケーションにアタッチされている場合、アプリケーションはシャットダウンされません。

適用対象