From ac578a2ad6ff1d1ce1496226c44a413189b1c6ee Mon Sep 17 00:00:00 2001 From: Serraniel Date: Wed, 1 Mar 2023 22:06:38 +0100 Subject: [PATCH] Reorganizes project structure --- {src => JpnCardsPokemon.Sdk}/Api/Card.cs | 2 +- {src => JpnCardsPokemon.Sdk}/Api/Set.cs | 4 ++-- {src => JpnCardsPokemon.Sdk}/Client/ApiClient.cs | 6 +++--- .../JpnCardsPokemon.Sdk.csproj | 0 .../Utils/JsonConverter/NoneIntJsonConverter.cs | 2 +- .../QueryFilter/AttributedQueryFilterBuilder.cs | 2 +- .../Utils/QueryFilter/CardQueryFilterBuilder.cs | 2 +- .../Utils/QueryFilter/IQueryFilterBuilder.cs | 6 ++++++ .../Utils/QueryFilter/QueryFilterNameAttribute.cs | 2 +- JpnCardsPokemon.Tests/{Tests => }/CardTests.cs | 6 +++--- JpnCardsPokemon.Tests/Classes/ApiTestClass.cs | 2 +- JpnCardsPokemon.Tests/JpnCardsPokemon.Tests.csproj | 1 + .../{Tests => }/QueryFilterTests.cs | 4 ++-- JpnCardsPokemon.Tests/{Tests => }/SetTests.cs | 2 +- JpnCardsPokemonSdk.sln | 12 ++++++------ 15 files changed, 30 insertions(+), 23 deletions(-) rename {src => JpnCardsPokemon.Sdk}/Api/Card.cs (97%) rename {src => JpnCardsPokemon.Sdk}/Api/Set.cs (92%) rename {src => JpnCardsPokemon.Sdk}/Client/ApiClient.cs (96%) rename src/JpnCardsPokemonSdk.csproj => JpnCardsPokemon.Sdk/JpnCardsPokemon.Sdk.csproj (100%) rename {src => JpnCardsPokemon.Sdk}/Utils/JsonConverter/NoneIntJsonConverter.cs (94%) rename {src => JpnCardsPokemon.Sdk}/Utils/QueryFilter/AttributedQueryFilterBuilder.cs (95%) rename {src => JpnCardsPokemon.Sdk}/Utils/QueryFilter/CardQueryFilterBuilder.cs (93%) create mode 100644 JpnCardsPokemon.Sdk/Utils/QueryFilter/IQueryFilterBuilder.cs rename {src => JpnCardsPokemon.Sdk}/Utils/QueryFilter/QueryFilterNameAttribute.cs (86%) rename JpnCardsPokemon.Tests/{Tests => }/CardTests.cs (64%) rename JpnCardsPokemon.Tests/{Tests => }/QueryFilterTests.cs (75%) rename JpnCardsPokemon.Tests/{Tests => }/SetTests.cs (95%) diff --git a/src/Api/Card.cs b/JpnCardsPokemon.Sdk/Api/Card.cs similarity index 97% rename from src/Api/Card.cs rename to JpnCardsPokemon.Sdk/Api/Card.cs index 2d8fb02..4084709 100644 --- a/src/Api/Card.cs +++ b/JpnCardsPokemon.Sdk/Api/Card.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace JpnCardsPokemonSdk.Api; +namespace JpnCardsPokemon.Sdk.Api; public class Card { diff --git a/src/Api/Set.cs b/JpnCardsPokemon.Sdk/Api/Set.cs similarity index 92% rename from src/Api/Set.cs rename to JpnCardsPokemon.Sdk/Api/Set.cs index 309acee..1d198ff 100644 --- a/src/Api/Set.cs +++ b/JpnCardsPokemon.Sdk/Api/Set.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; -using JpnCardsPokemonSdk.Utils.JsonConverter; +using JpnCardsPokemon.Sdk.Utils.JsonConverter; -namespace JpnCardsPokemonSdk.Api; +namespace JpnCardsPokemon.Sdk.Api; public class Set { diff --git a/src/Client/ApiClient.cs b/JpnCardsPokemon.Sdk/Client/ApiClient.cs similarity index 96% rename from src/Client/ApiClient.cs rename to JpnCardsPokemon.Sdk/Client/ApiClient.cs index 2bb6596..f8631f2 100644 --- a/src/Client/ApiClient.cs +++ b/JpnCardsPokemon.Sdk/Client/ApiClient.cs @@ -7,10 +7,10 @@ using System.Net.Http.Json; using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; -using JpnCardsPokemonSdk.Api; -using JpnCardsPokemonSdk.Utils.QueryFilter; +using JpnCardsPokemon.Sdk.Api; +using JpnCardsPokemon.Sdk.Utils.QueryFilter; -namespace JpnCardsPokemonSdk.Client; +namespace JpnCardsPokemon.Sdk.Client; public class ApiClient { diff --git a/src/JpnCardsPokemonSdk.csproj b/JpnCardsPokemon.Sdk/JpnCardsPokemon.Sdk.csproj similarity index 100% rename from src/JpnCardsPokemonSdk.csproj rename to JpnCardsPokemon.Sdk/JpnCardsPokemon.Sdk.csproj diff --git a/src/Utils/JsonConverter/NoneIntJsonConverter.cs b/JpnCardsPokemon.Sdk/Utils/JsonConverter/NoneIntJsonConverter.cs similarity index 94% rename from src/Utils/JsonConverter/NoneIntJsonConverter.cs rename to JpnCardsPokemon.Sdk/Utils/JsonConverter/NoneIntJsonConverter.cs index a8b91c3..1105e0b 100644 --- a/src/Utils/JsonConverter/NoneIntJsonConverter.cs +++ b/JpnCardsPokemon.Sdk/Utils/JsonConverter/NoneIntJsonConverter.cs @@ -2,7 +2,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace JpnCardsPokemonSdk.Utils.JsonConverter; +namespace JpnCardsPokemon.Sdk.Utils.JsonConverter; internal class NoneIntJsonConverter : JsonConverter { diff --git a/src/Utils/QueryFilter/AttributedQueryFilterBuilder.cs b/JpnCardsPokemon.Sdk/Utils/QueryFilter/AttributedQueryFilterBuilder.cs similarity index 95% rename from src/Utils/QueryFilter/AttributedQueryFilterBuilder.cs rename to JpnCardsPokemon.Sdk/Utils/QueryFilter/AttributedQueryFilterBuilder.cs index d8592b2..bb61651 100644 --- a/src/Utils/QueryFilter/AttributedQueryFilterBuilder.cs +++ b/JpnCardsPokemon.Sdk/Utils/QueryFilter/AttributedQueryFilterBuilder.cs @@ -3,7 +3,7 @@ using System.Net; using System.Reflection; using System.Text; -namespace JpnCardsPokemonSdk.Utils.QueryFilter; +namespace JpnCardsPokemon.Sdk.Utils.QueryFilter; public abstract class AttributedQueryFilterBuilder : IQueryFilterBuilder { diff --git a/src/Utils/QueryFilter/CardQueryFilterBuilder.cs b/JpnCardsPokemon.Sdk/Utils/QueryFilter/CardQueryFilterBuilder.cs similarity index 93% rename from src/Utils/QueryFilter/CardQueryFilterBuilder.cs rename to JpnCardsPokemon.Sdk/Utils/QueryFilter/CardQueryFilterBuilder.cs index 71b20ce..32da648 100644 --- a/src/Utils/QueryFilter/CardQueryFilterBuilder.cs +++ b/JpnCardsPokemon.Sdk/Utils/QueryFilter/CardQueryFilterBuilder.cs @@ -1,4 +1,4 @@ -namespace JpnCardsPokemonSdk.Utils.QueryFilter; +namespace JpnCardsPokemon.Sdk.Utils.QueryFilter; public class CardQueryFilterBuilder : AttributedQueryFilterBuilder { diff --git a/JpnCardsPokemon.Sdk/Utils/QueryFilter/IQueryFilterBuilder.cs b/JpnCardsPokemon.Sdk/Utils/QueryFilter/IQueryFilterBuilder.cs new file mode 100644 index 0000000..2e6a7ed --- /dev/null +++ b/JpnCardsPokemon.Sdk/Utils/QueryFilter/IQueryFilterBuilder.cs @@ -0,0 +1,6 @@ +namespace JpnCardsPokemon.Sdk.Utils.QueryFilter; + +public interface IQueryFilterBuilder +{ + string BuildQueryString(); +} \ No newline at end of file diff --git a/src/Utils/QueryFilter/QueryFilterNameAttribute.cs b/JpnCardsPokemon.Sdk/Utils/QueryFilter/QueryFilterNameAttribute.cs similarity index 86% rename from src/Utils/QueryFilter/QueryFilterNameAttribute.cs rename to JpnCardsPokemon.Sdk/Utils/QueryFilter/QueryFilterNameAttribute.cs index 34cdf4e..650ba6a 100644 --- a/src/Utils/QueryFilter/QueryFilterNameAttribute.cs +++ b/JpnCardsPokemon.Sdk/Utils/QueryFilter/QueryFilterNameAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace JpnCardsPokemonSdk.Utils.QueryFilter; +namespace JpnCardsPokemon.Sdk.Utils.QueryFilter; [AttributeUsage(AttributeTargets.Property)] public class QueryFilterNameAttribute : Attribute diff --git a/JpnCardsPokemon.Tests/Tests/CardTests.cs b/JpnCardsPokemon.Tests/CardTests.cs similarity index 64% rename from JpnCardsPokemon.Tests/Tests/CardTests.cs rename to JpnCardsPokemon.Tests/CardTests.cs index e54bb58..97a9d14 100644 --- a/JpnCardsPokemon.Tests/Tests/CardTests.cs +++ b/JpnCardsPokemon.Tests/CardTests.cs @@ -1,7 +1,7 @@ -using JpnCardsPokemon.Tests.Classes; -using JpnCardsPokemonSdk.Utils.QueryFilter; +using JpnCardsPokemon.Sdk.Utils.QueryFilter; +using JpnCardsPokemon.Tests.Classes; -namespace JpnCardsPokemon.Tests.Tests.Tests; +namespace JpnCardsPokemon.Tests; public class CardTests : ApiTestClass { diff --git a/JpnCardsPokemon.Tests/Classes/ApiTestClass.cs b/JpnCardsPokemon.Tests/Classes/ApiTestClass.cs index cc16aad..70644b5 100644 --- a/JpnCardsPokemon.Tests/Classes/ApiTestClass.cs +++ b/JpnCardsPokemon.Tests/Classes/ApiTestClass.cs @@ -1,4 +1,4 @@ -using JpnCardsPokemonSdk.Client; +using JpnCardsPokemon.Sdk.Client; namespace JpnCardsPokemon.Tests.Classes; diff --git a/JpnCardsPokemon.Tests/JpnCardsPokemon.Tests.csproj b/JpnCardsPokemon.Tests/JpnCardsPokemon.Tests.csproj index 702d6c9..4aa2e2b 100644 --- a/JpnCardsPokemon.Tests/JpnCardsPokemon.Tests.csproj +++ b/JpnCardsPokemon.Tests/JpnCardsPokemon.Tests.csproj @@ -23,6 +23,7 @@ + diff --git a/JpnCardsPokemon.Tests/Tests/QueryFilterTests.cs b/JpnCardsPokemon.Tests/QueryFilterTests.cs similarity index 75% rename from JpnCardsPokemon.Tests/Tests/QueryFilterTests.cs rename to JpnCardsPokemon.Tests/QueryFilterTests.cs index 9136dfd..775c194 100644 --- a/JpnCardsPokemon.Tests/Tests/QueryFilterTests.cs +++ b/JpnCardsPokemon.Tests/QueryFilterTests.cs @@ -1,6 +1,6 @@ -using JpnCardsPokemonSdk.Utils.QueryFilter; +using JpnCardsPokemon.Sdk.Utils.QueryFilter; -namespace JpnCardsPokemon.Tests.Tests; +namespace JpnCardsPokemon.Tests; public class QueryFilterTests { diff --git a/JpnCardsPokemon.Tests/Tests/SetTests.cs b/JpnCardsPokemon.Tests/SetTests.cs similarity index 95% rename from JpnCardsPokemon.Tests/Tests/SetTests.cs rename to JpnCardsPokemon.Tests/SetTests.cs index 2f3bd3e..e85a13f 100644 --- a/JpnCardsPokemon.Tests/Tests/SetTests.cs +++ b/JpnCardsPokemon.Tests/SetTests.cs @@ -1,6 +1,6 @@ using JpnCardsPokemon.Tests.Classes; -namespace JpnCardsPokemon.Tests.Tests; +namespace JpnCardsPokemon.Tests; public class SetTests : ApiTestClass { diff --git a/JpnCardsPokemonSdk.sln b/JpnCardsPokemonSdk.sln index e767054..ac36caa 100644 --- a/JpnCardsPokemonSdk.sln +++ b/JpnCardsPokemonSdk.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33318.248 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JpnCardsPokemonSdk", "src\JpnCardsPokemonSdk.csproj", "{D5C0B825-C6F2-48BB-B4C8-E416B545151E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JpnCardsPokemon.Tests", "JpnCardsPokemon.Tests\JpnCardsPokemon.Tests.csproj", "{13AA15F0-0CCD-4B59-A235-5DFB5C0B6C74}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JpnCardsPokemon.Tests", "JpnCardsPokemon.Tests\JpnCardsPokemon.Tests.csproj", "{13AA15F0-0CCD-4B59-A235-5DFB5C0B6C74}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JpnCardsPokemon.Sdk", "JpnCardsPokemon.Sdk\JpnCardsPokemon.Sdk.csproj", "{1494A616-C934-47E4-BFD7-C45DB1B3F932}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,14 +13,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D5C0B825-C6F2-48BB-B4C8-E416B545151E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5C0B825-C6F2-48BB-B4C8-E416B545151E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5C0B825-C6F2-48BB-B4C8-E416B545151E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5C0B825-C6F2-48BB-B4C8-E416B545151E}.Release|Any CPU.Build.0 = Release|Any CPU {13AA15F0-0CCD-4B59-A235-5DFB5C0B6C74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {13AA15F0-0CCD-4B59-A235-5DFB5C0B6C74}.Debug|Any CPU.Build.0 = Debug|Any CPU {13AA15F0-0CCD-4B59-A235-5DFB5C0B6C74}.Release|Any CPU.ActiveCfg = Release|Any CPU {13AA15F0-0CCD-4B59-A235-5DFB5C0B6C74}.Release|Any CPU.Build.0 = Release|Any CPU + {1494A616-C934-47E4-BFD7-C45DB1B3F932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1494A616-C934-47E4-BFD7-C45DB1B3F932}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1494A616-C934-47E4-BFD7-C45DB1B3F932}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1494A616-C934-47E4-BFD7-C45DB1B3F932}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE