Skip to content

Commit

Permalink
Merge 5c1a225 into 03c5d1d
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno authored Mar 11, 2021
2 parents 03c5d1d + 5c1a225 commit 1cb8566
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion src/MonkeyCache.LiteDB/Barrel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class Barrel : IBarrel
{
public static string ApplicationId { get; set; } = string.Empty;
public static string EncryptionKey { get; set; } = string.Empty;
public static bool Upgrade { get; set; } = false;

static readonly Lazy<string> baseCacheDir = new Lazy<string>(() =>
{
Expand Down Expand Up @@ -64,6 +65,8 @@ public static IBarrel Create(string cacheDirectory, bool cache = false)
if (!string.IsNullOrWhiteSpace(EncryptionKey))
path = $"Filename={path}; Password={EncryptionKey}";
#endif
if(Upgrade)
path += ";Upgrade=true ";

db = new LiteDatabase(path);
col = db.GetCollection<Banana>();
Expand Down Expand Up @@ -301,4 +304,4 @@ public void Empty(params string[] key)
}
#endregion
}
}
}
2 changes: 1 addition & 1 deletion src/MonkeyCache.LiteDB/MonkeyCache.LiteDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.8" />
<PackageReference Include="LiteDB" Version="5.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="LiteDB">
<Version>5.0.8</Version>
<Version>5.0.10</Version>
</PackageReference>
<PackageReference Include="sqlite-net-pcl">
<Version>1.7.335</Version>
Expand Down Expand Up @@ -108,4 +108,4 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.8" />
<PackageReference Include="LiteDB" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
<PackageReference Include="Ooui" Version="0.10.222" />
<PackageReference Include="Ooui.AspNetCore" Version="0.10.222" />
Expand Down
4 changes: 2 additions & 2 deletions src/MonkeyCache.TestApp.UWP/MonkeyCache.TestApp.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="LiteDB">
<Version>5.0.8</Version>
<Version>5.0.10</Version>
</PackageReference>
<PackageReference Include="sqlite-net-pcl">
<Version>1.7.335</Version>
Expand Down Expand Up @@ -183,4 +183,4 @@
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
</Project>
</Project>
4 changes: 2 additions & 2 deletions src/MonkeyCache.TestApp/MonkeyCache.TestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.8" />
<PackageReference Include="LiteDB" Version="5.0.10" />
<PackageReference Include="sqlite-net-pcl" Version="1.7.335" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
</ItemGroup>
Expand All @@ -25,4 +25,4 @@
<DependentUpon>*.xaml</DependentUpon>
</Compile>
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/MonkeyCache.TestsLiteDB/MonkeyCache.TestsLiteDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.8" />
<PackageReference Include="LiteDB" Version="5.0.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
Expand Down

0 comments on commit 1cb8566

Please sign in to comment.