ReactiveMarbles.CacheDatabase.Sqlite3 1.3.1
dotnet add package ReactiveMarbles.CacheDatabase.Sqlite3 --version 1.3.1
NuGet\Install-Package ReactiveMarbles.CacheDatabase.Sqlite3 -Version 1.3.1
该命令旨在在 Visual Studio 的包管理器控制台中使用,因为它使用了 NuGet 模块的 Install-Package 版本。
<PackageReference Include="ReactiveMarbles.CacheDatabase.Sqlite3" Version="1.3.1" />
对于支持 PackageReference 的项目,将此 XML 节点复制到项目文件中以引用包。
paket add ReactiveMarbles.CacheDatabase.Sqlite3 --version 1.3.1
NuGet 团队不提供对此客户端的支持。请联系其 管理员 以获取支持。
#r "nuget: ReactiveMarbles.CacheDatabase.Sqlite3, 1.3.1"
#r 指令可以在 F# Interactive 和 Polyglot Notebooks 中使用。将其复制到交互式工具或脚本的源代码中以引用包。
// Install ReactiveMarbles.CacheDatabase.Sqlite3 as a Cake Addin #addin nuget:?package=ReactiveMarbles.CacheDatabase.Sqlite3&version=1.3.1 // Install ReactiveMarbles.CacheDatabase.Sqlite3 as a Cake Tool #tool nuget:?package=ReactiveMarbles.CacheDatabase.Sqlite3&version=1.3.1
NuGet 团队不提供对 Cake 客户端的支持。请联系其 管理员 以获取支持。
CacheDatabase
使用 Akavache 和 Frank Krueger 的 SQLite 框架的重写。
ReactiveMarbles.CacheDatabase.EncryptedSqlite3
ReactiveMarbles.CacheDatabase.Sqlite3
CacheDatabase 设置
用于与可安装应用配合使用的配置数据库,提供持久性的配置设置,这些设置位于应用程序文件夹的下一级,使得更新更加轻松。
示例应用配置代码
public class ViewSettings : SettingsBase
{
/// <summary>
/// Initializes a new instance of the <see cref="ViewSettings"/> class.
/// </summary>
public ViewSettings()
: 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>
public bool BoolTest
{
get => GetOrCreate(true); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the byte test.
/// </summary>
/// <value>
/// The byte test.
/// </value>
public byte ByteTest
{
get => GetOrCreate((byte)123); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the short test.
/// </summary>
/// <value>
/// The short test.
/// </value>
public short ShortTest
{
get => GetOrCreate((short)16); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the int test.
/// </summary>
/// <value>
/// The int test.
/// </value>
public int IntTest
{
get => GetOrCreate(1); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the long test.
/// </summary>
/// <value>
/// The long test.
/// </value>
public long LongTest
{
get => GetOrCreate(123456); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the string test.
/// </summary>
/// <value>
/// The string test.
/// </value>
public string? StringTest
{
get => GetOrCreate("TestString"); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the float test.
/// </summary>
/// <value>
/// The float test.
/// </value>
public float FloatTest
{
get => GetOrCreate(2.2f); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the double test.
/// </summary>
/// <value>
/// The double test.
/// </value>
public double DoubleTest
{
get => GetOrCreate(23.8d); set => SetOrCreate(value);
}
/// <summary>
/// Gets or sets the enum test.
/// </summary>
/// <value>
/// The enum test.
/// </value>
public EnumTestValue EnumTest
{
get => GetOrCreate(EnumTestValue.Option1); set => SetOrCreate(value);
}
}
可选:覆盖配置缓存路径
AppInfo.OverrideSettingsCachePath(path);
创建一个实例或获取现有的 SettingsSettingsCache
安装ReactiveMarbles.CacheDatabase.Settings
var viewSettings = await AppInfo.SetupSettingsStore<ViewSettings>();
创建实例或获取现有的加密设置 SettingsCache
安装ReactiveMarbles.CacheDatabase.EncryptedSettings
var viewSettings = await AppInfo.SetupSettingsStore<ViewSettings>("SECURE_PASSWORD");
删除 SettingsCache 的实例
await AppInfo.DeleteSettingsStore<ViewSettings>();
在应用程序退出时关闭 SettingsCache
await AppInfo.DisposeSettingsStore<ViewSettings>();
可以创建多个 SettingsCache,每个 SettingsCache 都将创建一个具有 SettingsCache 类名的 SettingsCache 数据库。
产品 | 版本 兼容和额外的计算目标框架版本。 |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 已计算。 netcoreapp2.1 已计算。 netcoreapp2.2 已计算。 netcoreapp3.0 已计算。 netcoreapp3.1 已计算。 |
.NET 标准化 | netstandard2.0 兼容。 netstandard2.1 已计算。 |
.NET 框架 | net461 已计算。 net462 已计算。 net463 已计算。 net47 已计算。 net471 已计算。 net472 已计算。 net48 已计算。 net481 已计算。 |
MonoAndroid | monoandroid 已计算。 |
MonoMac | monomac 已计算。 |
MonoTouch | monotouch 已计算。 |
Tizen | tizen40 已计算。 tizen60 已计算。 |
Xamarin.iOS | xamarinios 已计算。 |
Xamarin.Mac | xamarinmac 已计算。 |
Xamarin.TVOS | xamarintvos 已计算。 |
Xamarin.WatchOS | xamarinwatchos 已计算。 |
-
.NETStandard 2.0
- ReactiveMarbles.CacheDatabase.Core (>= 1.3.1)
- sqlite-net-pcl (>= 1.9.141-beta)
- SQLitePCLRaw.bundle_green (>= 2.1.5)
-
net6.0
- ReactiveMarbles.CacheDatabase.Core (>= 1.3.1)
- sqlite-net-pcl (>= 1.9.141-beta)
- SQLitePCLRaw.bundle_green (>= 2.1.5)
-
net7.0
- ReactiveMarbles.CacheDatabase.Core (>= 1.3.1)
- sqlite-net-pcl (>= 1.9.141-beta)
- SQLitePCLRaw.bundle_green (>= 2.1.5)
NuGet 包 (1)
显示依赖 ReactiveMarbles.CacheDatabase.Sqlite3 的顶级 1 个 NuGet 包
包 | 下载 |
---|---|
ReactiveMarbles.CacheDatabase.Settings
允许用户在本地 sqlite 数据库中缓存值。 |
GitHub 仓库
此包未被任何流行的 GitHub 仓库使用。