Use dynamic interfaces
Last updated
Was this helpful?
Last updated
Was this helpful?
Requires: .
The basic recommended way to get most up-to-date settings in the presence of background updates is to use 's Get method (see the ) on each access attempt. However, it's also possible to obtain an inherently dynamic settings object whose properties are updated under the hood. This requires to use an interface as the settings model:
Note that in order to get a guaranteed consistent view of the settings without "tearing" (observing a mix of values from before and after update due to a race condition) when using a nested object (section), it's recommended to access a snapshot of this nested object saved in a variable: