Skip to content

Commit 090ffef

Browse files
authored
Feature/architecture (#2)
* Split Core to packages * Update README.md
1 parent 27e369c commit 090ffef

30 files changed

+169
-41
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This library is still under construction and needs to be peer reviewed as well a
1717
Add reference to EntityFramework.DataProtection.Core to your project.
1818

1919
```
20-
dotnet add package EF.DataProtection.Core
20+
dotnet add package EF.DataProtection.Extensions
2121
```
2222

2323
Include the following code to Startup.cs

src/EF.DataProtection.Core/Abstractions/IDataEncryptor.cs renamed to src/EF.DataProtection.Abstractions/Abstractions/IDataEncryptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace EF.DataProtection.Core.Abstractions
1+
namespace EF.DataProtection.Abstractions.Abstractions
22
{
33
public interface IDataEncryptor : IDataProtector
44
{

src/EF.DataProtection.Core/Abstractions/IDataHasher.cs renamed to src/EF.DataProtection.Abstractions/Abstractions/IDataHasher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace EF.DataProtection.Core.Abstractions
1+
namespace EF.DataProtection.Abstractions.Abstractions
22
{
33
public interface IDataHasher : IDataProtector
44
{

src/EF.DataProtection.Core/Abstractions/IDataProtector.cs renamed to src/EF.DataProtection.Abstractions/Abstractions/IDataProtector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace EF.DataProtection.Core.Abstractions
1+
namespace EF.DataProtection.Abstractions.Abstractions
22
{
33
public interface IDataProtector
44
{

src/EF.DataProtection.Core/Abstractions/DataProtectionAttribute.cs renamed to src/EF.DataProtection.Abstractions/Attributes/DataProtectionAttribute.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
using System;
2+
using EF.DataProtection.Abstractions.Abstractions;
23

3-
namespace EF.DataProtection.Core.Abstractions
4+
namespace EF.DataProtection.Abstractions.Attributes
45
{
56
[AttributeUsage(AttributeTargets.Property)]
67
public class DataProtectionAttribute: Attribute
78
{
89
public Type ProtectorType { get; }
910

10-
public DataProtectionAttribute(Type protectorType)
11+
protected DataProtectionAttribute(Type protectorType)
1112
{
1213
ProtectorType = typeof(IDataProtector)
1314
.IsAssignableFrom(protectorType)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<AssemblyName>EF.DataProtection.Abstractions</AssemblyName>
6+
<PackageId>EF.DataProtection.Abstractions</PackageId>
7+
<Version>1.1.0</Version>
8+
<PackageProjectUrl>https://github.com/qdimka/EntityFramework.DataProtection</PackageProjectUrl>
9+
<IsTestProject>false</IsTestProject>
10+
</PropertyGroup>
11+
12+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System;
2+
3+
namespace EF.DataProtection.Aes
4+
{
5+
public class Class1
6+
{
7+
}
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
</Project>

src/EF.DataProtection.Core.Tests/Services/Aes256DataEncryptorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using EF.DataProtection.Core.Abstractions;
2-
using EF.DataProtection.Core.Services.Aes256;
1+
using EF.DataProtection.Abstractions.Abstractions;
2+
using EF.DataProtection.Services.Aes256;
33
using Xunit;
44

55
namespace EF.DataProtection.Core.Tests.Services

src/EF.DataProtection.Core/Customizers/EncryptedModelCustomizer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Linq;
22
using System.Reflection;
3-
using EF.DataProtection.Core.Abstractions;
3+
using EF.DataProtection.Abstractions.Abstractions;
4+
using EF.DataProtection.Abstractions.Attributes;
45
using EF.DataProtection.Core.Services;
56
using Microsoft.EntityFrameworkCore;
67
using Microsoft.EntityFrameworkCore.Infrastructure;

0 commit comments

Comments
 (0)