C# Class GSF.Configuration.ConfigurationFile

Represents a configuration file of a Windows or Web application.
Afficher le fichier Open project: GridProtectionAlliance/gsf Class Usage Examples

Private Properties

Свойство Type Description
ConfigurationFile System
ConfigurationFile System
CreateConfigurationFile void
ExecuteConfigurationSave void
GetConfiguration System.Configuration.Configuration
TrimEnd string
ValidateConfigurationFile void

Méthodes publiques

Méthode Description
Open ( string configFilePath ) : ConfigurationFile

Opens application config file at the specified configFilePath.

Reload ( ) : void

Reloads the current configuration settings from the configuration file that the ConfigurationFile represents.

RestoreDefaultUserSettings ( ) : void

Restores all the default settings for SettingScope.User scoped settings.

Save ( ) : void

Writes the configuration settings contained within this ConfigurationFile object to the configuration file that it represents.

Save ( ConfigurationSaveMode saveMode ) : void

Writes the configuration settings contained within this ConfigurationFile object to the configuration file that it represents.

SaveAs ( string fileName ) : void

Writes the configuration settings contained within this ConfigurationFile object to the specified configuration file.

SetCryptoKey ( string cryptoKey ) : void

Sets the key to be used for encrypting and decrypting values of Settings.

Private Methods

Méthode Description
ConfigurationFile ( ) : System
ConfigurationFile ( string configFilePath ) : System

Initializes a new instance of the ConfigurationFile class.

CreateConfigurationFile ( string configFilePath ) : void
ExecuteConfigurationSave ( ) : void
GetConfiguration ( string configFilePath ) : Configuration
TrimEnd ( string stringToTrim, string textToTrim ) : string
ValidateConfigurationFile ( string configFilePath ) : void

Method Details

Open() public static méthode

Opens application config file at the specified configFilePath.
public static Open ( string configFilePath ) : ConfigurationFile
configFilePath string Path of the config file that belongs to a Windows or Web application.
Résultat ConfigurationFile

Reload() public méthode

Reloads the current configuration settings from the configuration file that the ConfigurationFile represents.
public Reload ( ) : void
Résultat void

RestoreDefaultUserSettings() public méthode

Restores all the default settings for SettingScope.User scoped settings.
public RestoreDefaultUserSettings ( ) : void
Résultat void

Save() public méthode

Writes the configuration settings contained within this ConfigurationFile object to the configuration file that it represents.
public Save ( ) : void
Résultat void

Save() public méthode

Writes the configuration settings contained within this ConfigurationFile object to the configuration file that it represents.
public Save ( ConfigurationSaveMode saveMode ) : void
saveMode ConfigurationSaveMode One of the values.
Résultat void

SaveAs() public méthode

Writes the configuration settings contained within this ConfigurationFile object to the specified configuration file.
public SaveAs ( string fileName ) : void
fileName string The path and file name to save the configuration file to.
Résultat void

SetCryptoKey() public méthode

Sets the key to be used for encrypting and decrypting values of Settings.
public SetCryptoKey ( string cryptoKey ) : void
cryptoKey string New crypto key.
Résultat void