Idioma

HostingEnvironmentSection.ShutdownTimeout Propriedade

Definição

Obtém ou define o tempo, em segundos, para desligar a aplicação de forma elegante.

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 Propriedade

A TimeSpan é o número de segundos especificado para desligar a aplicação de forma gradual. O padrão é 30 segundos.

Atributos

Exemplos

O seguinte exemplo de código mostra como usar a ShutdownTimeout propriedade. Este exemplo de código faz parte de um exemplo maior fornecido para a HostingEnvironmentSection classe.

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

Observações

O valor padrão da ShutdownTimeout propriedade é 30 segundos. Esta configuração pode ser definida ao nível da máquina ou da aplicação. Se esta configuração estiver definida a qualquer outro nível de configuração, é ignorada. Se um depurador estiver associado à aplicação, esta não será desligada.

Aplica-se a