Skip to content

Commit

Permalink
Merge pull request #22 from shugaoye/master
Browse files Browse the repository at this point in the history
Build 2.0.4
  • Loading branch information
shugaoye authored Dec 30, 2023
2 parents dbbd523 + 132f73c commit 3577444
Show file tree
Hide file tree
Showing 145 changed files with 703 additions and 4,100 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

18 changes: 9 additions & 9 deletions KPCLib.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>KPCLib</id>
<version>1.3.8.0</version>
<version>2.0.4</version>
<authors>Roger Ye</authors>
<owners>Roger Ye</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">LGPL-3.0-or-later</license>
<projectUrl>https://github.com/passxyz/KPCLib</projectUrl>
<description>This is the build of KeePassLib in Xamarin Portable Class Library. Three platforms, UWP, Android and iOS, are supported and tested.</description>
<projectUrl>https://passxyz.github.io</projectUrl>
<description>This is a .NET standard 2.0 build of KeePassLib.</description>
<releaseNotes>
- Added Exists() in ProtectedBinaryDictionary
</releaseNotes>
<copyright>Dominik Reichl is the author of the original KeePassLib on Windows platform. Roger Ye updated and enhanced this library for .NET Standard.</copyright>
- Refactored the project structure, build using .NET 8.0
</releaseNotes>
<copyright>Dominik Reichl is the author of KeePassLib on Windows platform. Roger Ye updated and enhanced this library for .NET Standard.</copyright>
<repository url="https://github.com/passxyz/KPCLib" />
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="SkiaSharp" version="2.80.2" exclude="Build,Analyzers" />
<dependency id="Svg.Skia" version="0.5.3" exclude="Build,Analyzers" />
<dependency id="SkiaSharp" version="2.88.6" exclude="Build,Analyzers" />
<dependency id="Svg.Skia" version="1.0.0.9" exclude="Build,Analyzers" />
</group>
</dependencies>
<summary>KeePassLib built as .NET Standard Library</summary>
</metadata>
<files>
<file src="KPCLib/bin/Release/netstandard2.0/KPCLib.dll" target="lib/netstandard2.0/KPCLib.dll" />
<file src="KPCLib/bin/Release/netstandard2.0/PureOtp.dll" target="lib/netstandard2.0/PureOtp.dll" />
<file src="KeePassLib/bin/Release/netstandard2.0/KeePassLib.dll" target="lib/netstandard2.0/KeePassLib.dll" />
</files>
</package>
59 changes: 20 additions & 39 deletions KPCLib.sln
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31025.194
# Visual Studio Version 17
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KPCLib", "KPCLib\KPCLib.csproj", "{3F08B816-6E5F-4DB5-9BF5-4EDF9E662855}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KeePassLib", "KeePassLib\KeePassLib.csproj", "{3F08B816-6E5F-4DB5-9BF5-4EDF9E662855}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KPCLib.xunit", "KPCLib.xunit\KPCLib.xunit.csproj", "{4764BB09-267A-4760-AE2D-6979BDA5FB88}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PassXYZLib", "PassXYZLib\PassXYZLib.csproj", "{E6F6B65A-6474-4978-9F9C-F22194688240}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B5CFEC4A-7D25-4D24-B4F7-A568E1DF4750}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
CHANGELOG.md = CHANGELOG.md
KPCLib.nuspec = KPCLib.nuspec
PassXYZLib.nuspec = PassXYZLib.nuspec
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PureOtp", "PureOtp\PureOtp\PureOtp.csproj", "{6361E2B1-FAC9-4D2E-9876-90A37E516598}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KPCLib", "KPCLib\KPCLib.csproj", "{B072D007-02BD-4A84-9255-8492A3E16667}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -64,38 +61,22 @@ Global
{4764BB09-267A-4760-AE2D-6979BDA5FB88}.Release|x64.Build.0 = Release|Any CPU
{4764BB09-267A-4760-AE2D-6979BDA5FB88}.Release|x86.ActiveCfg = Release|Any CPU
{4764BB09-267A-4760-AE2D-6979BDA5FB88}.Release|x86.Build.0 = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|ARM.Build.0 = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|x64.ActiveCfg = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|x64.Build.0 = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|x86.ActiveCfg = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Debug|x86.Build.0 = Debug|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|Any CPU.Build.0 = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|ARM.ActiveCfg = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|ARM.Build.0 = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|x64.ActiveCfg = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|x64.Build.0 = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|x86.ActiveCfg = Release|Any CPU
{E6F6B65A-6474-4978-9F9C-F22194688240}.Release|x86.Build.0 = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|ARM.Build.0 = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|x64.ActiveCfg = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|x64.Build.0 = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|x86.ActiveCfg = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Debug|x86.Build.0 = Debug|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|Any CPU.Build.0 = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|ARM.ActiveCfg = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|ARM.Build.0 = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|x64.ActiveCfg = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|x64.Build.0 = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|x86.ActiveCfg = Release|Any CPU
{6361E2B1-FAC9-4D2E-9876-90A37E516598}.Release|x86.Build.0 = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|ARM.ActiveCfg = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|ARM.Build.0 = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|x64.ActiveCfg = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|x64.Build.0 = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|x86.ActiveCfg = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Debug|x86.Build.0 = Debug|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|Any CPU.Build.0 = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|ARM.ActiveCfg = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|ARM.Build.0 = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|x64.ActiveCfg = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|x64.Build.0 = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|x86.ActiveCfg = Release|Any CPU
{B072D007-02BD-4A84-9255-8492A3E16667}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
112 changes: 0 additions & 112 deletions KPCLib.xunit/DeviceLockTests.cs

This file was deleted.

12 changes: 10 additions & 2 deletions KPCLib.xunit/DisplayNameOrderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@

using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;

namespace KPCLib.xunit.Orderers
namespace xunit.Orderers
{
class DisplayNameOrderer : ITestCollectionOrderer
public class DisplayNameOrderer : ITestCollectionOrderer
{
public IEnumerable<ITestCollection> OrderTestCollections(
IEnumerable<ITestCollection> testCollections) =>
testCollections.OrderBy(collection => collection.DisplayName);
}

public class AlphabeticalOrderer : ITestCaseOrderer
{
public IEnumerable<TTestCase> OrderTestCases<TTestCase>(
IEnumerable<TTestCase> testCases) where TTestCase : ITestCase =>
testCases.OrderBy(testCase => testCase.TestMethod.Method.Name);
}
}
27 changes: 15 additions & 12 deletions KPCLib.xunit/KPCLib.xunit.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>net6.0</TargetFrameworks>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>

<Version>1.3.2</Version>
<Version>2.0.4</Version>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.34" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="PassXYZ" Version="2.1.4.11" />
<PackageReference Include="SkiaSharp" Version="2.80.2" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.80.2" />
<PackageReference Include="Svg.Skia" Version="0.5.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="HtmlAgilityPack" Version="1.11.57" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="SkiaSharp" Version="2.88.6" />
<PackageReference Include="Svg.Skia" Version="1.0.0.9" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\KPCLib\KPCLib.csproj" />
<ProjectReference Include="..\PassXYZLib\PassXYZLib.csproj" />
<ProjectReference Include="..\KeePassLib\KeePassLib.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="PassXYZ\" />
</ItemGroup>

<Target Name="CopyDataFiles" AfterTargets="Build">
Expand Down
34 changes: 34 additions & 0 deletions KPCLib.xunit/KPCLib/ItemTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xunit;
using KPCLib;
using KeePassLib;

namespace xunit.KPCLib
{
public class ItemTest
{
[Fact]
public void PwEntryTest()
{
Item item = new PwEntry(true, true);
Debug.WriteLine($"Id={item.Id}, Name={item.Name}, Desc={item.Description}, Time={item.LastModificationTime}");
Assert.NotNull(item.Id);
Assert.True(!item.IsGroup);
}

[Fact]
public void PwGroupTest()
{
Item item = new PwGroup(true, true);
Debug.WriteLine($"Id={item.Id}, Name={item.Name}, Desc={item.Description}, Time={item.LastModificationTime}");
Assert.NotNull(item.Id);
Assert.True(item.IsGroup);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
using Svg.Skia;

using Xunit;
using PassXYZLib;
using KeePassLib.Utility;

// Need to turn off test parallelization so we can validate the run order
[assembly: CollectionBehavior(DisableTestParallelization = true)]
[assembly: TestCollectionOrderer("KPCLib.xunit.Orderers.DisplayNameOrderer", "KPCLib.xunit")]
[assembly: TestCollectionOrderer("KPCLib.xunit.Orderers.DisplayNameOrderer", "xunit.KeePassLib")]

namespace KPCLib.xunit
namespace xunit.KeePassLib
{
[Collection("Z. GfxUtil Collection")]
public class GfxUtilTests
Expand Down
Loading

0 comments on commit 3577444

Please sign in to comment.