Closed ghost1372 closed 6 years ago
EnableAutosave
is a feature of SettingsBag
and is NOT a module. so it doesn't matter when you enable/call it as long as it is before you try to access one of the settings.
Construct and LoadNow(); is used to load modules into the settings class (see modules in wiki).
For example: if your file is supposed to be encrypted using WithEncryption("pass") module, you need to first load the module and only then load the file (just like on the second example).
JsonSettings.Construct<SettingsBag>("config.json").EnableAutosave().WithEncryption("pass").LoadNow();
tnx
hi whats difference between these two?
SettingsBag Settings = JsonSettings.Load<SettingsBag>("config.json").EnableAutosave();
SettingsBag Settings { get; } = JsonSettings.Construct<SettingsBag>("config.json").EnableAutosave().LoadNow();