Aracılığıyla paylaş


HostingEnvironmentSection.ShutdownTimeout Özellik

Tanım

Uygulamayı düzgün bir şekilde kapatmak için saniye olarak süreyi alır veya ayarlar.

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

Özellik Değeri

TimeSpan Uygulamayı düzgün bir şekilde kapatmak için belirtilen saniye sayısıdır. Varsayılan değer 30 saniyedir.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin ShutdownTimeout nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için HostingEnvironmentSection sağlanan daha büyük bir örneğin parçasıdır.

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

Açıklamalar

Özelliğin ShutdownTimeout varsayılan değeri 30 saniyedir. Bu ayar makine veya uygulama düzeyinde ayarlanabilir. Bu ayar başka bir yapılandırma düzeyinde tanımlanmışsa yoksayılır. Uygulamaya bir hata ayıklayıcı ekliyse, uygulama kapatılmaz.

Şunlara uygulanır