SectionInformation.RestartOnExternalChanges Propriété

Définition

Obtient ou définit une valeur qui spécifie si la modification d'un fichier Include de configuration externe requiert un redémarrage de l'application.

public:
 property bool RestartOnExternalChanges { bool get(); void set(bool value); };
public bool RestartOnExternalChanges { get; set; }
member this.RestartOnExternalChanges : bool with get, set
Public Property RestartOnExternalChanges As Boolean

Valeur de propriété

true si une modification dans un fichier Include de configuration externe requiert le redémarrage de l'application ; sinon, false. La valeur par défaut est true.

Exceptions

La valeur sélectionnée est en conflit avec une valeur déjà définie.

Exemples

L’exemple suivant montre comment obtenir la valeur de propriété RestartOnExternalChanges d’un ConfigurationSection objet.

static public void RestartOnExternalChanges()
{
    SectionInformation sInfo =
        GetSectionInformation();

    bool restartOnChange = 
        sInfo.RestartOnExternalChanges;
    Console.WriteLine("Section type: {0}", 
        restartOnChange.ToString());
}
Public Shared Sub RestartOnExternalChanges()

    Dim sInfo As SectionInformation = _
    GetSectionInformation()

    Dim restartOnChange As Boolean = _
    sInfo.RestartOnExternalChanges
    Console.WriteLine("Section type: {0}", _
    restartOnChange.ToString())

End Sub

Remarques

Définissez la RestartOnExternalChanges propriété sur false pour empêcher le redémarrage d’une application lorsque les paramètres de configuration du fichier include externe sont modifiés pour cet ConfigurationSection objet.

S’applique à