Skip to content

Repository files navigation

LicenseBuild

CacheDatabase

A reimplementation of Akavache using the SQLite framework by Frank Krueger.

ReactiveMarbles.CacheDatabase.EncryptedSqlite3 NugetNuGet

ReactiveMarbles.CacheDatabase.Sqlite3 NugetNuGet

CacheDatabase.Settings

A settings database for use with installable applications to provide persistent settings which are located one level down from the application folder making updates less painfull.

Example Application settings code

publicclassViewSettings:SettingsBase{/// <summary>/// Initializes a new instance of the <see cref="ViewSettings"/> class./// </summary>publicViewSettings():base(nameof(ViewSettings)){}/// <summary>/// Gets or sets a value indicating whether [bool test]./// </summary>/// <value>/// <c>true</c> if [bool test]; otherwise, <c>false</c>./// </value>publicboolBoolTest{get=>GetOrCreate(true);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the byte test./// </summary>/// <value>/// The byte test./// </value>publicbyteByteTest{get=>GetOrCreate((byte)123);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the short test./// </summary>/// <value>/// The short test./// </value>publicshortShortTest{get=>GetOrCreate((short)16);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the int test./// </summary>/// <value>/// The int test./// </value>publicintIntTest{get=>GetOrCreate(1);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the long test./// </summary>/// <value>/// The long test./// </value>publiclongLongTest{get=>GetOrCreate(123456);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the string test./// </summary>/// <value>/// The string test./// </value>publicstring?StringTest{get=>GetOrCreate("TestString");set=>SetOrCreate(value);}/// <summary>/// Gets or sets the float test./// </summary>/// <value>/// The float test./// </value>publicfloatFloatTest{get=>GetOrCreate(2.2f);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the double test./// </summary>/// <value>/// The double test./// </value>publicdoubleDoubleTest{get=>GetOrCreate(23.8d);set=>SetOrCreate(value);}/// <summary>/// Gets or sets the enum test./// </summary>/// <value>/// The enum test./// </value>publicEnumTestValueEnumTest{get=>GetOrCreate(EnumTestValue.Option1);set=>SetOrCreate(value);}}

OPTIONAL: Override Settings Cache Path

AppInfo.OverrideSettingsCachePath(path);

Create an instance or get existing Settings SettingsCache

Install ReactiveMarbles.CacheDatabase.Settings NugetNuGet

varviewSettings=awaitAppInfo.SetupSettingsStore<ViewSettings>();

To Create an instance or get existing EncryptedSettings SettingsCache

Install ReactiveMarbles.CacheDatabase.EncryptedSettings NugetNuGet

varviewSettings=awaitAppInfo.SetupSettingsStore<ViewSettings>("SECURE_PASSWORD");

To Delete the instance of the SettingsCache

awaitAppInfo.DeleteSettingsStore<ViewSettings>();

To Close the SettingsCache upon application exit

awaitAppInfo.DisposeSettingsStore<ViewSettings>();

Multiple SettingsCache's can be created, each SettingsCache will have a SettingsCache database created with the name of the SettingsCache class.

About

A reimplementation of Akavache using the SQLite framework by Frank Krueger.

Topics

Resources

Stars

14 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages