Storage
With NetDaemon you can manage state using the storage. The storage is persisted per application instance in json file in the .storage folder. If you rename the class or the instance id the old storage will not be read att startup. All persisted states will be available after startup of applications.
#
Store and get state using Storage propertyStoring state is as simple as using the dynamic property Storage
#
Store and get custom objectswarning
NOT IMPLEMENTED YET IN V2
You can use the SaveData<T>
and GetData<T>
to store custom data. The data have to be serializable with the System.Text.Json
. This will not be unique to the app storing the data so it could be shared amongs several apps.
Example: