Skip to content

Commit 7da9cac

Browse files
committed
Separating Core and Interfaces projects
1 parent 2fc0cc5 commit 7da9cac

46 files changed

Lines changed: 216 additions & 270 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.ComponentModel;
2-
using Upsilon.Apps.Passkey.Core.Internal.Utils;
3-
using Upsilon.Apps.Passkey.Core.Public.Enums;
4-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
1+
using Upsilon.Apps.Passkey.Interfaces.Enums;
2+
using Upsilon.Apps.Passkey.Interfaces;
3+
using Upsilon.Apps.Passkey.Core.Utils;
4+
using System.ComponentModel;
55

6-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
6+
namespace Upsilon.Apps.Passkey.Core.Models
77
{
88
internal sealed class Account : IAccount
99
{
@@ -47,7 +47,7 @@ string IAccount.Password
4747
if (!string.IsNullOrEmpty(value)
4848
&& Password != value)
4949
{
50-
Dictionary<DateTime, string> oldPasswords = ISerializationCenter.Clone(Database.SerializationCenter, Passwords);
50+
Dictionary<DateTime, string> oldPasswords = Passwords.CloneWith(Database.SerializationCenter);
5151
Passwords[DateTime.Now] = Password = value;
5252

5353
if (_service != null)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using Upsilon.Apps.Passkey.Core.Internal.Utils;
2-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
1+
using Upsilon.Apps.Passkey.Core.Utils;
2+
using Upsilon.Apps.Passkey.Interfaces;
33

4-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
4+
namespace Upsilon.Apps.Passkey.Core.Models
55
{
66
internal sealed class AutoSave
77
{
@@ -21,7 +21,7 @@ internal T UpdateValue<T>(string itemId,
2121
T newValue,
2222
string readableValue) where T : notnull
2323
{
24-
if (ISerializationCenter.AreDifferent(Database.SerializationCenter, oldValue, newValue))
24+
if (Database.SerializationCenter.AreDifferent(oldValue, newValue))
2525
{
2626
_addChange(itemId,
2727
itemName,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
1+
namespace Upsilon.Apps.Passkey.Core.Models
22
{
33
internal sealed class Change
44
{
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using Upsilon.Apps.Passkey.Core.Internal.Utils;
2-
using Upsilon.Apps.Passkey.Core.Public.Enums;
3-
using Upsilon.Apps.Passkey.Core.Public.Events;
4-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
5-
using Upsilon.Apps.Passkey.Core.Public.Utils;
1+
using Upsilon.Apps.Passkey.Core.Utils;
2+
using Upsilon.Apps.Passkey.Interfaces;
3+
using Upsilon.Apps.Passkey.Interfaces.Enums;
4+
using Upsilon.Apps.Passkey.Interfaces.Events;
5+
using Upsilon.Apps.Passkey.Interfaces.Utils;
66

7-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
7+
namespace Upsilon.Apps.Passkey.Core.Models
88
{
9-
internal sealed class Database : IDatabase
9+
public sealed class Database : IDatabase
1010
{
1111
#region IUser interface explicit Internal
1212

@@ -236,7 +236,7 @@ private Database(ICryptographyCenter cryptographicCenter,
236236
Logs.Database = this;
237237
}
238238

239-
internal static IDatabase Create(ICryptographyCenter cryptographicCenter,
239+
public static IDatabase Create(ICryptographyCenter cryptographicCenter,
240240
ISerializationCenter serializationCenter,
241241
IPasswordFactory passwordFactory,
242242
string databaseFile,
@@ -286,7 +286,7 @@ internal static IDatabase Create(ICryptographyCenter cryptographicCenter,
286286
return database;
287287
}
288288

289-
internal static IDatabase Open(ICryptographyCenter cryptographicCenter,
289+
public static IDatabase Open(ICryptographyCenter cryptographicCenter,
290290
ISerializationCenter serializationCenter,
291291
IPasswordFactory passwordFactory,
292292
string databaseFile,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
1+
using Upsilon.Apps.Passkey.Interfaces;
22

3-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
3+
namespace Upsilon.Apps.Passkey.Core.Models
44
{
55
internal class Log : ILog
66
{
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.ComponentModel;
2-
using Upsilon.Apps.Passkey.Core.Internal.Utils;
3-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
2+
using Upsilon.Apps.Passkey.Core.Utils;
3+
using Upsilon.Apps.Passkey.Interfaces;
44

5-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
5+
namespace Upsilon.Apps.Passkey.Core.Models
66
{
77
internal sealed class Service : IService
88
{
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using System.ComponentModel;
2-
using Upsilon.Apps.Passkey.Core.Internal.Utils;
3-
using Upsilon.Apps.Passkey.Core.Public.Enums;
4-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
5-
using Upsilon.Apps.Passkey.Core.Public.Utils;
2+
using Upsilon.Apps.Passkey.Core.Utils;
3+
using Upsilon.Apps.Passkey.Interfaces;
4+
using Upsilon.Apps.Passkey.Interfaces.Enums;
65

7-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
6+
namespace Upsilon.Apps.Passkey.Core.Models
87
{
98
internal sealed class User : IUser
109
{
@@ -38,7 +37,7 @@ string[] IUser.Passkeys
3837
get => Database.Get(Passkeys);
3938
set
4039
{
41-
CredentialChanged |= ISerializationCenter.AreDifferent(Database.SerializationCenter, Passkeys, value);
40+
CredentialChanged |= Database.SerializationCenter.AreDifferent(Passkeys, value);
4241

4342
Passkeys = Database.AutoSave.UpdateValue(ItemId,
4443
itemName: ToString(),
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using Upsilon.Apps.Passkey.Core.Public.Enums;
2-
using Upsilon.Apps.Passkey.Core.Public.Interfaces;
1+
using Upsilon.Apps.Passkey.Interfaces;
2+
using Upsilon.Apps.Passkey.Interfaces.Enums;
33

4-
namespace Upsilon.Apps.Passkey.Core.Internal.Models
4+
namespace Upsilon.Apps.Passkey.Core.Models
55
{
66
internal class Warning : IWarning
77
{

Core/Public/Interfaces/ISerializationCenter.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

Core/Upsilon.Apps.Passkey.Core.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919
<WarningLevel>9999</WarningLevel>
2020
</PropertyGroup>
2121

22+
<ItemGroup>
23+
<ProjectReference Include="..\Interfaces\Upsilon.Apps.Passkey.Interfaces.csproj" />
24+
</ItemGroup>
25+
2226
</Project>

0 commit comments

Comments
 (0)