HostingEnvironmentSection.ShutdownTimeout Propiedad

Definición

Obtiene o establece el período de tiempo, en segundos, para cerrar la aplicación correctamente.

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

Valor de propiedad

Una estructura TimeSpan que es el número especificado de segundos para cerrar la aplicación correctamente. El valor predeterminado es 30 segundos.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo utilizar la propiedad ShutdownTimeout. Este ejemplo de código es parte de un ejemplo mayor proporcionado para la clase HostingEnvironmentSection.

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

Comentarios

El valor predeterminado de la ShutdownTimeout propiedad es de 30 segundos. Esta configuración se puede establecer en el nivel de máquina o aplicación. Si esta configuración se define en cualquier otro nivel de configuración, se omite. Si un depurador está asociado a la aplicación, la aplicación no se apagará.

Se aplica a