![]() |
BogaNet 1.4.0
|
Container for preferences in Avalonia (browser). More...
Public Member Functions | |
BrowserPreferencesContainer () | |
override bool | Load (string filepath="") |
Load the preference file. | |
override Task< bool > | LoadAsync (string filepath="") |
Load the preference file asynchronously. | |
override bool | Save (string filepath="") |
Save the preference file. | |
override Task< bool > | SaveAsync (string filepath="") |
Save the preference file asynchronously. | |
override bool | Delete (string filepath="") |
Delete all preferences, including the file. | |
![]() | |
virtual bool | Remove (string key) |
Removes a key/value from the preferences. | |
virtual bool | ContainsKey (string key) |
Checks if a given key exists in the preferences. | |
virtual object | Get (string key, bool obfuscated=false) |
Get an object for a key. | |
virtual bool | TryGet (string key, out object result, bool obfuscated=false) |
Tries to get an object for a key. | |
virtual void | Set (string key, object value, bool obfuscated=false) |
Set an object for a key. | |
override string | ToString () |
Events | |
new IFilePreferences.? FileLoaded | OnFileLoaded |
new IFilePreferences.? FileSaved | OnFileSaved |
![]() | |
IFilePreferences.? FileLoaded | OnFileLoaded |
IFilePreferences.? FileSaved | OnFileSaved |
Additional Inherited Members | |
![]() | |
string | _file = "BNPrefs.json" |
Dictionary< string, object > | _preferences = [] |
![]() | |
virtual ByteObf | IV = 139 [set] |
IV for the obfuscated data. | |
virtual bool | IsLoaded [get, protected set] |
Is the preferences-container loaded? | |
virtual bool | IsSaved [get, protected set] |
Is the current preferences-container saved? | |
virtual List< string > | Keys [get] |
Current keys of the preferences. | |
virtual int | Count [get] |
Current count of keys from the preferences. | |
![]() |
Container for preferences in Avalonia (browser).
BogaNet.Prefs.BrowserPreferencesContainer.BrowserPreferencesContainer | ( | ) |
|
virtual |
Delete all preferences, including the file.
filepath | Preference file to delete |
returns>True if the operation was successful
Exception |
Reimplemented from BogaNet.Prefs.PreferencesContainer.
|
virtual |
Load the preference file.
filepath | Preference file to load |
returns>True if the operation was successful
Exception |
Reimplemented from BogaNet.Prefs.PreferencesContainer.
|
virtual |
Load the preference file asynchronously.
filepath | Preference file to load |
returns>True if the operation was successful
Exception |
Reimplemented from BogaNet.Prefs.PreferencesContainer.
|
virtual |
Save the preference file.
filepath | Preference file to save |
returns>True if the operation was successful
Exception |
Reimplemented from BogaNet.Prefs.PreferencesContainer.
|
virtual |
Save the preference file asynchronously.
filepath | Preference file to save |
returns>True if the operation was successful
Exception |
Reimplemented from BogaNet.Prefs.PreferencesContainer.
new IFilePreferences.? FileLoaded BogaNet.Prefs.BrowserPreferencesContainer.OnFileLoaded |
new IFilePreferences.? FileSaved BogaNet.Prefs.BrowserPreferencesContainer.OnFileSaved |