C# Class Nexus.Client.ModManagement.IniInstaller

This installs INI value changes.
Inheritance: IIniInstaller
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
EditIni ( string p_strSettingsFileName, string p_strSection, string p_strKey, string p_strValue ) : bool

Sets the specified value in the specified Ini file to the given value.

FinalizeInstall ( ) : void

Finalizes the installation of the values.

GetIniInt ( string p_strSettingsFileName, string p_strSection, string p_strKey ) : Int32

Retrieves the specified settings value as an integer.

GetIniString ( string p_strSettingsFileName, string p_strSection, string p_strKey ) : string

Retrieves the specified settings value as a string.

IniInstaller ( IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : System

A simple constructor that initializes the object with its dependencies.

UneditIni ( string p_strSettingsFileName, string p_strSection, string p_strKey ) : void

Undoes the edit made to the spcified key.

Method Details

EditIni() public method

Sets the specified value in the specified Ini file to the given value.
public EditIni ( string p_strSettingsFileName, string p_strSection, string p_strKey, string p_strValue ) : bool
p_strSettingsFileName string The name of the settings file to edit.
p_strSection string The section in the Ini file to edit.
p_strKey string The key in the Ini file to edit.
p_strValue string The value to which to set the key.
return bool

FinalizeInstall() public method

Finalizes the installation of the values.
public FinalizeInstall ( ) : void
return void

GetIniInt() public method

Retrieves the specified settings value as an integer.
public GetIniInt ( string p_strSettingsFileName, string p_strSection, string p_strKey ) : Int32
p_strSettingsFileName string The name of the settings file from which to retrieve the value.
p_strSection string The section containing the value to retrieve.
p_strKey string The key of the value to retrieve.
return System.Int32

GetIniString() public method

Retrieves the specified settings value as a string.
public GetIniString ( string p_strSettingsFileName, string p_strSection, string p_strKey ) : string
p_strSettingsFileName string The name of the settings file from which to retrieve the value.
p_strSection string The section containing the value to retrieve.
p_strKey string The key of the value to retrieve.
return string

IniInstaller() public method

A simple constructor that initializes the object with its dependencies.
public IniInstaller ( IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : System
p_modMod IMod The mod being installed.
p_ilgInstallLog IInstallLog The install log to use to log file installations.
p_tfmFileManager ChinhDo.Transactions.TxFileManager The transactional file manager to use to interact with the file system.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
return System

UneditIni() public method

Undoes the edit made to the spcified key.
public UneditIni ( string p_strSettingsFileName, string p_strSection, string p_strKey ) : void
p_strSettingsFileName string The name of the settings file to unedit.
p_strSection string The section in the Ini file to unedit.
p_strKey string The key in the Ini file to unedit.
return void