From d6008862a8b608fea62e75aeebe22686c488fb8f Mon Sep 17 00:00:00 2001 From: mo3in Date: Fri, 3 Nov 2023 12:29:03 +0330 Subject: [PATCH 1/3] feat(scope): make Abstractions layer --- gridify.sln | 15 +++++++++++ root.props | 25 +++++++++++++++++++ .../Gridify.Abstractions.csproj | 10 ++++++++ .../GridifyQuery.cs | 0 .../IGridifyFiltering.cs | 0 .../IGridifyOrdering.cs | 0 .../IGridifyPagination.cs | 0 .../IGridifyQuery.cs | 0 .../Paging.cs | 0 .../QueryablePaging.cs | 0 .../Gridify.EntityFramework.csproj | 17 ++----------- src/Gridify/Gridify.csproj | 19 ++------------ 12 files changed, 54 insertions(+), 32 deletions(-) create mode 100644 root.props create mode 100644 src/Gridify.Abstractions/Gridify.Abstractions.csproj rename src/{Gridify => Gridify.Abstractions}/GridifyQuery.cs (100%) rename src/{Gridify => Gridify.Abstractions}/IGridifyFiltering.cs (100%) rename src/{Gridify => Gridify.Abstractions}/IGridifyOrdering.cs (100%) rename src/{Gridify => Gridify.Abstractions}/IGridifyPagination.cs (100%) rename src/{Gridify => Gridify.Abstractions}/IGridifyQuery.cs (100%) rename src/{Gridify => Gridify.Abstractions}/Paging.cs (100%) rename src/{Gridify => Gridify.Abstractions}/QueryablePaging.cs (100%) diff --git a/gridify.sln b/gridify.sln index 1bee61bb..2db7efe5 100644 --- a/gridify.sln +++ b/gridify.sln @@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gridify.Elasticsearch", "sr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gridify.Elasticsearch.Tests", "test\Gridify.Elasticsearch.Tests\Gridify.Elasticsearch.Tests.csproj", "{08E66DC6-A741-49D2-978B-E644EF3A5BA8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gridify.Abstractions", "src\Gridify.Abstractions\Gridify.Abstractions.csproj", "{A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -157,6 +159,18 @@ Global {08E66DC6-A741-49D2-978B-E644EF3A5BA8}.Release|x64.Build.0 = Release|Any CPU {08E66DC6-A741-49D2-978B-E644EF3A5BA8}.Release|x86.ActiveCfg = Release|Any CPU {08E66DC6-A741-49D2-978B-E644EF3A5BA8}.Release|x86.Build.0 = Release|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Debug|x64.ActiveCfg = Debug|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Debug|x64.Build.0 = Debug|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Debug|x86.ActiveCfg = Debug|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Debug|x86.Build.0 = Debug|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Release|Any CPU.Build.0 = Release|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Release|x64.ActiveCfg = Release|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Release|x64.Build.0 = Release|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Release|x86.ActiveCfg = Release|Any CPU + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {CDFDBB16-1D9F-40FD-B693-96D1D4FB79EE} = {1BBCBA37-25E5-4BFF-A8E8-7EE582E0317F} @@ -169,5 +183,6 @@ Global {7C6699E7-7B6E-48D4-920F-6DD3568FBFD9} = {1BBCBA37-25E5-4BFF-A8E8-7EE582E0317F} {21A86C33-1E72-4771-9C40-73EF9A21AFD5} = {0FCD2937-1953-465E-8608-42B8EB8757C7} {08E66DC6-A741-49D2-978B-E644EF3A5BA8} = {1BBCBA37-25E5-4BFF-A8E8-7EE582E0317F} + {A0EE419D-7E37-4AC9-B204-0F6C23E33BF9} = {0FCD2937-1953-465E-8608-42B8EB8757C7} EndGlobalSection EndGlobal diff --git a/root.props b/root.props new file mode 100644 index 00000000..9d4024aa --- /dev/null +++ b/root.props @@ -0,0 +1,25 @@ + + + 2.12.0 + Alireza Sabouri + TuxTeam + https://github.com/alirezanet/Gridify + MIT + latest + true + enable + true + true + true + true + snupkg + true + README.md + net5.0;net6.0;netstandard2.0;netstandard2.1;net7.0;net8.0 + + + + true + Recommended + + diff --git a/src/Gridify.Abstractions/Gridify.Abstractions.csproj b/src/Gridify.Abstractions/Gridify.Abstractions.csproj new file mode 100644 index 00000000..b4203bd6 --- /dev/null +++ b/src/Gridify.Abstractions/Gridify.Abstractions.csproj @@ -0,0 +1,10 @@ + + + + Gridify.Abstractions + Gridify (Elasticsearch), Easy way to apply Filtering, Sorting, and Pagination using text-based data. + + + + + diff --git a/src/Gridify/GridifyQuery.cs b/src/Gridify.Abstractions/GridifyQuery.cs similarity index 100% rename from src/Gridify/GridifyQuery.cs rename to src/Gridify.Abstractions/GridifyQuery.cs diff --git a/src/Gridify/IGridifyFiltering.cs b/src/Gridify.Abstractions/IGridifyFiltering.cs similarity index 100% rename from src/Gridify/IGridifyFiltering.cs rename to src/Gridify.Abstractions/IGridifyFiltering.cs diff --git a/src/Gridify/IGridifyOrdering.cs b/src/Gridify.Abstractions/IGridifyOrdering.cs similarity index 100% rename from src/Gridify/IGridifyOrdering.cs rename to src/Gridify.Abstractions/IGridifyOrdering.cs diff --git a/src/Gridify/IGridifyPagination.cs b/src/Gridify.Abstractions/IGridifyPagination.cs similarity index 100% rename from src/Gridify/IGridifyPagination.cs rename to src/Gridify.Abstractions/IGridifyPagination.cs diff --git a/src/Gridify/IGridifyQuery.cs b/src/Gridify.Abstractions/IGridifyQuery.cs similarity index 100% rename from src/Gridify/IGridifyQuery.cs rename to src/Gridify.Abstractions/IGridifyQuery.cs diff --git a/src/Gridify/Paging.cs b/src/Gridify.Abstractions/Paging.cs similarity index 100% rename from src/Gridify/Paging.cs rename to src/Gridify.Abstractions/Paging.cs diff --git a/src/Gridify/QueryablePaging.cs b/src/Gridify.Abstractions/QueryablePaging.cs similarity index 100% rename from src/Gridify/QueryablePaging.cs rename to src/Gridify.Abstractions/QueryablePaging.cs diff --git a/src/Gridify.EntityFramework/Gridify.EntityFramework.csproj b/src/Gridify.EntityFramework/Gridify.EntityFramework.csproj index 4c1f85bf..56db2198 100644 --- a/src/Gridify.EntityFramework/Gridify.EntityFramework.csproj +++ b/src/Gridify.EntityFramework/Gridify.EntityFramework.csproj @@ -1,22 +1,9 @@ + + Gridify.EntityFramework - 2.12.0 - Alireza Sabouri - TuxTeam Gridify (EntityFramework), Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data. - https://github.com/alirezanet/Gridify - MIT - true - true - true - true - true - snupkg - README.md - net5.0;net6.0;netstandard2.0;netstandard2.1;net7.0 - default - enable diff --git a/src/Gridify/Gridify.csproj b/src/Gridify/Gridify.csproj index 29a6eacb..b077f100 100644 --- a/src/Gridify/Gridify.csproj +++ b/src/Gridify/Gridify.csproj @@ -1,28 +1,13 @@ + Gridify - 2.12.0 - Alireza Sabouri - TuxTeam Gridify, Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data. - https://github.com/alirezanet/Gridify - MIT - latest - true - enable - true - true - true - true - snupkg - true - README.md - net5.0;net6.0;netstandard2.0;netstandard2.1;net7.0 - + From 91b82509e7ec5880fa1bcb6e8e7ec8ed7994ce97 Mon Sep 17 00:00:00 2001 From: mo3in Date: Fri, 3 Nov 2023 22:09:03 +0330 Subject: [PATCH 2/3] docs(Gridify.Abstractions): update docs --- docs/guide/abstractions.md | 25 +++++++++++++++++++ docs/guide/getting-started.md | 6 +++-- .../Gridify.Abstractions.csproj | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 docs/guide/abstractions.md diff --git a/docs/guide/abstractions.md b/docs/guide/abstractions.md new file mode 100644 index 00000000..6b853a66 --- /dev/null +++ b/docs/guide/abstractions.md @@ -0,0 +1,25 @@ +# Abstractions + +Gridify.Abstraction includes a set of interface and classes that act like contract with other libraries to use it without referencing gridify package itself. + +its include: + +- `GridifyQuery` +- `Paging` +- `IGridifyQuery` +- `IGridifyPagination` +- `IGridifyFiltering` +- `IGridifyOrdering` + + +### Package Manager + +``` pm:no-line-numbers:no-v-pre +Install-Package Gridify.Abstactions -Version {{ $version }} +``` + +### .NET CLI + +``` pm:no-line-numbers:no-v-pre +dotnet add package Gridify.Abstactions -Version {{ $version }} +``` diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index ce26358a..a6633088 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -1,4 +1,3 @@ - # Getting Started There are three packages available for gridify in the nuget repository. @@ -12,7 +11,10 @@ If you are using the Entity framework in your project, you should install the `G This package has the same functionality as the `Gridify` package, but it is designed to be more compatible with [Entity Framework](./entity-framework.md). -In order to use Gridify with Elasticsearch it's necessary to install `Gridify.Elasticsearch`. Please read [the separate thread of the documentation](./elasticsearch/getting-started.md). +In order to use Gridify with Elasticsearch it's necessary to install `Gridify.Elasticsearch`. Please +read [the separate thread of the documentation](./elasticsearch/getting-started.md). + +[Gridify.Abstraction](abstractions.md) includes a set of interface and classes that act like contract with other libraries to use it without referencing gridify package itself. ::: ## Installation diff --git a/src/Gridify.Abstractions/Gridify.Abstractions.csproj b/src/Gridify.Abstractions/Gridify.Abstractions.csproj index b4203bd6..cc72f826 100644 --- a/src/Gridify.Abstractions/Gridify.Abstractions.csproj +++ b/src/Gridify.Abstractions/Gridify.Abstractions.csproj @@ -2,7 +2,7 @@ Gridify.Abstractions - Gridify (Elasticsearch), Easy way to apply Filtering, Sorting, and Pagination using text-based data. + Gridify.Abstractions, includes a set of interface and classes that act like contract. From e18a9ba1056c5838e13e5f4f583072e2b645cd9d Mon Sep 17 00:00:00 2001 From: mo3in Date: Fri, 3 Nov 2023 22:37:41 +0330 Subject: [PATCH 3/3] ci(abstractions): update to .net 8 & add Gridify.Abstraction to publish workflow --- .github/workflows/codeql.yml | 2 +- .github/workflows/publush.yml | 8 +++++++- .github/workflows/pullRequest.yml | 2 +- .husky/csx/version-updater.csx | 3 +-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8581664e..241067cd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -66,7 +66,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build env: HUSKY: 0 diff --git a/.github/workflows/publush.yml b/.github/workflows/publush.yml index 1abf7507..430f889f 100644 --- a/.github/workflows/publush.yml +++ b/.github/workflows/publush.yml @@ -15,7 +15,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build @@ -28,6 +28,12 @@ jobs: PROJECT_FILE_PATH: src/Gridify/Gridify.csproj INCLUDE_SYMBOLS: true NUGET_KEY: ${{secrets.NUGET_API_KEY}} + - name: Publish Gridify.Abstractions + uses: alirezanet/publish-nuget@v3.0.0 + with: + PROJECT_FILE_PATH: src/Gridify.Abstractions/Gridify.Abstractions.csproj + INCLUDE_SYMBOLS: true + NUGET_KEY: ${{secrets.NUGET_API_KEY}} - name: Publish Gridify.EntityFramework uses: alirezanet/publish-nuget@v3.0.0 with: diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index c8d16ce0..aedc04e9 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -14,7 +14,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.husky/csx/version-updater.csx b/.husky/csx/version-updater.csx index f475d5f9..7c42208e 100644 --- a/.husky/csx/version-updater.csx +++ b/.husky/csx/version-updater.csx @@ -14,8 +14,7 @@ Usage example: */ var paths = new[] { - @"src\Gridify\Gridify.csproj", - @"src\Gridify.EntityFramework\Gridify.EntityFramework.csproj", + @"root.props", @"docs\.vuepress\configs\version.ts" };