Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 632 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 632 Bytes

Persistence

Allows to mark properties with a simple attribute and persist them in registry.

How it works

Marking a property as persistent:

[Persistent("MyPersistedProperty", DefaultValue=1)] // the DefaultValue is optional
public int MyProperty { get; set; }

Setting the application registry node:

[assembly: RegistryPersistence(@"Software\MyApplication", CurrentUser = true)]

Things to be considered

When two properties from different instances or different types use the same persistence name, their value always stays synchronized (changing a value in an instance changes it everywhere).