Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monorepo #149

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .github/workflows/dotnet_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: .NET

on:
push:
branches: [ develop* ]
pull_request:
branches: [ develop* ]

jobs:
build:
env:
BUILD_CONFIG: Debug
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/SSchulze1989/index.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c $BUILD_CONFIG --no-restore
- name: Test
run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal --filter FullyQualifiedName\!~IntegrationTests
27 changes: 27 additions & 0 deletions .github/workflows/dotnet_main_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: .NET

on:
pull_request:
branches: [ main ]

jobs:
build:
env:
BUILD_CONFIG: Release
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/SSchulze1989/index.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c $BUILD_CONFIG --no-restore
- name: Test
run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal
27 changes: 27 additions & 0 deletions .github/workflows/dotnet_main_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: .NET

on:
push:
branches: [ main ]

jobs:
publish:
env:
BUILD_CONFIG: Release
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/SSchulze1989/index.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c $BUILD_CONFIG --no-restore
- name: Test
run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal
1 change: 1 addition & 0 deletions .github/workflows/mkdocs_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: .NET
on:
push:
branches: [ main ]
paths: [ docs/** ]

jobs:
build:
Expand Down
78 changes: 78 additions & 0 deletions iRLeagueManager.Web.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ VisualStudioVersion = 17.0.31912.275
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueManager.Web", "src\iRLeagueManager.Web\iRLeagueManager.Web.csproj", "{0E1210B9-CB90-497D-9B67-D084D7DFE768}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Client", "src\iRLeagueApiCore.Client\iRLeagueApiCore.Client.csproj", "{44B24383-25F8-4257-9AAD-33709EA87297}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Server", "src\iRLeagueApiCore.Server\iRLeagueApiCore.Server.csproj", "{A2D07223-4EC9-4EF9-8C9F-5E60AD25D7BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Services", "src\iRLeagueApiCore.Services\iRLeagueApiCore.Services.csproj", "{AC620517-78B1-4F01-B790-98167887F21D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.TrackImport", "src\iRLeagueApiCore.TrackImport\iRLeagueApiCore.TrackImport.csproj", "{0BDB48B8-874E-4F72-AA4A-59842D613636}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Mocking", "test\iRLeagueApiCore.Mocking\iRLeagueApiCore.Mocking.csproj", "{1AAD7DAE-BA65-49A2-B9F9-C7355EF92252}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Services.Tests", "test\iRLeagueApiCore.Services.Tests\iRLeagueApiCore.Services.Tests.csproj", "{53F6E2DD-FED4-48B5-9208-3E77CF69BFA4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.UnitTests", "test\iRLeagueApiCore.UnitTests\iRLeagueApiCore.UnitTests.csproj", "{C1BB891C-DB8A-470E-90E2-D7E5263AEAA7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Common", "src\iRLeagueApiCore.Common\iRLeagueApiCore.Common.csproj", "{FF70174F-5A5C-4885-A1D9-CE2E0294A0A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Common.Tests", "test\iRLeagueApiCore.Common.Tests\iRLeagueApiCore.Common.Tests.csproj", "{00695048-6893-4A66-A490-4C845D244A03}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueDatabaseCore", "src\iRLeagueDatabaseCore\iRLeagueDatabaseCore.csproj", "{ED1D3D4D-9C2A-4D59-96AC-F58ABF4935DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueDatabaseCore.Migrations", "src\iRLeagueDatabaseCore.Migrations\iRLeagueDatabaseCore.Migrations.csproj", "{7712AE15-156D-4BA7-9CC6-42F71A0A5328}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DbIntegrationTests", "test\DbIntegrationTests\DbIntegrationTests.csproj", "{6F10B4B3-9737-4532-BACB-4247F78FA7C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{951DD6F7-F6D6-4EB9-B53C-6F63998668F6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +41,58 @@ Global
{0E1210B9-CB90-497D-9B67-D084D7DFE768}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E1210B9-CB90-497D-9B67-D084D7DFE768}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E1210B9-CB90-497D-9B67-D084D7DFE768}.Release|Any CPU.Build.0 = Release|Any CPU
{44B24383-25F8-4257-9AAD-33709EA87297}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44B24383-25F8-4257-9AAD-33709EA87297}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44B24383-25F8-4257-9AAD-33709EA87297}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44B24383-25F8-4257-9AAD-33709EA87297}.Release|Any CPU.Build.0 = Release|Any CPU
{A2D07223-4EC9-4EF9-8C9F-5E60AD25D7BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2D07223-4EC9-4EF9-8C9F-5E60AD25D7BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2D07223-4EC9-4EF9-8C9F-5E60AD25D7BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2D07223-4EC9-4EF9-8C9F-5E60AD25D7BE}.Release|Any CPU.Build.0 = Release|Any CPU
{AC620517-78B1-4F01-B790-98167887F21D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC620517-78B1-4F01-B790-98167887F21D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC620517-78B1-4F01-B790-98167887F21D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC620517-78B1-4F01-B790-98167887F21D}.Release|Any CPU.Build.0 = Release|Any CPU
{0BDB48B8-874E-4F72-AA4A-59842D613636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BDB48B8-874E-4F72-AA4A-59842D613636}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BDB48B8-874E-4F72-AA4A-59842D613636}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BDB48B8-874E-4F72-AA4A-59842D613636}.Release|Any CPU.Build.0 = Release|Any CPU
{1AAD7DAE-BA65-49A2-B9F9-C7355EF92252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AAD7DAE-BA65-49A2-B9F9-C7355EF92252}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AAD7DAE-BA65-49A2-B9F9-C7355EF92252}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AAD7DAE-BA65-49A2-B9F9-C7355EF92252}.Release|Any CPU.Build.0 = Release|Any CPU
{53F6E2DD-FED4-48B5-9208-3E77CF69BFA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53F6E2DD-FED4-48B5-9208-3E77CF69BFA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53F6E2DD-FED4-48B5-9208-3E77CF69BFA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53F6E2DD-FED4-48B5-9208-3E77CF69BFA4}.Release|Any CPU.Build.0 = Release|Any CPU
{C1BB891C-DB8A-470E-90E2-D7E5263AEAA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C1BB891C-DB8A-470E-90E2-D7E5263AEAA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1BB891C-DB8A-470E-90E2-D7E5263AEAA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1BB891C-DB8A-470E-90E2-D7E5263AEAA7}.Release|Any CPU.Build.0 = Release|Any CPU
{FF70174F-5A5C-4885-A1D9-CE2E0294A0A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF70174F-5A5C-4885-A1D9-CE2E0294A0A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF70174F-5A5C-4885-A1D9-CE2E0294A0A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF70174F-5A5C-4885-A1D9-CE2E0294A0A7}.Release|Any CPU.Build.0 = Release|Any CPU
{00695048-6893-4A66-A490-4C845D244A03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00695048-6893-4A66-A490-4C845D244A03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00695048-6893-4A66-A490-4C845D244A03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00695048-6893-4A66-A490-4C845D244A03}.Release|Any CPU.Build.0 = Release|Any CPU
{ED1D3D4D-9C2A-4D59-96AC-F58ABF4935DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED1D3D4D-9C2A-4D59-96AC-F58ABF4935DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED1D3D4D-9C2A-4D59-96AC-F58ABF4935DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED1D3D4D-9C2A-4D59-96AC-F58ABF4935DB}.Release|Any CPU.Build.0 = Release|Any CPU
{7712AE15-156D-4BA7-9CC6-42F71A0A5328}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7712AE15-156D-4BA7-9CC6-42F71A0A5328}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7712AE15-156D-4BA7-9CC6-42F71A0A5328}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7712AE15-156D-4BA7-9CC6-42F71A0A5328}.Release|Any CPU.Build.0 = Release|Any CPU
{6F10B4B3-9737-4532-BACB-4247F78FA7C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F10B4B3-9737-4532-BACB-4247F78FA7C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F10B4B3-9737-4532-BACB-4247F78FA7C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F10B4B3-9737-4532-BACB-4247F78FA7C4}.Release|Any CPU.Build.0 = Release|Any CPU
{951DD6F7-F6D6-4EB9-B53C-6F63998668F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{951DD6F7-F6D6-4EB9-B53C-6F63998668F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{951DD6F7-F6D6-4EB9-B53C-6F63998668F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{951DD6F7-F6D6-4EB9-B53C-6F63998668F6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
12 changes: 12 additions & 0 deletions src/iRLeagueApiCore.Client/Endpoints/Cars/CarsEndpoint.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using iRLeagueApiCore.Client.Http;
using iRLeagueApiCore.Client.QueryBuilder;
using iRLeagueApiCore.Common.Models.Results;

namespace iRLeagueApiCore.Client.Endpoints.Cars;
internal sealed class CarsEndpoint : GetEndpoint<CarListModel>, ICarsEndpoint
{
public CarsEndpoint(HttpClientWrapper httpClient, RouteBuilder routeBuilder) : base(httpClient, routeBuilder)
{
RouteBuilder.AddEndpoint("Cars");
}
}
6 changes: 6 additions & 0 deletions src/iRLeagueApiCore.Client/Endpoints/Cars/ICarsEndpoint.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using iRLeagueApiCore.Common.Models.Results;

namespace iRLeagueApiCore.Client.Endpoints.Cars;
public interface ICarsEndpoint : IGetEndpoint<CarListModel>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using iRLeagueApiCore.Client.Endpoints.Results;
using iRLeagueApiCore.Client.Http;
using iRLeagueApiCore.Client.QueryBuilder;
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
internal class ChampSeasonByIdEndpoint : UpdateEndpoint<ChampSeasonModel, PutChampSeasonModel>, IChampSeasonByIdEndpoint
{
public ChampSeasonByIdEndpoint(HttpClientWrapper httpClientWrapper, RouteBuilder routeBuilder, long id) :
base(httpClientWrapper, routeBuilder)
{
RouteBuilder.AddParameter(id);
}

IPostEndpoint<ResultConfigModel, PostResultConfigModel> IChampSeasonByIdEndpoint.ResultConfigs()
{
return new ResultConfigsEndpoint(HttpClientWrapper, RouteBuilder);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using iRLeagueApiCore.Client.Http;
using iRLeagueApiCore.Client.QueryBuilder;
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
internal class ChampSeasonsEndpoint : GetAllEndpoint<ChampSeasonModel>, IChampSeasonsEndpoint, ISeasonChampSeasonsEndpoint, IChampionshipChampSeasonsEndpoint
{
public ChampSeasonsEndpoint(HttpClientWrapper httpClientWrapper, RouteBuilder routeBuilder) :
base(httpClientWrapper, routeBuilder)
{
RouteBuilder.AddEndpoint("ChampSeasons");
}

IChampSeasonByIdEndpoint IWithIdEndpoint<IChampSeasonByIdEndpoint, long>.WithId(long id)
{
return new ChampSeasonByIdEndpoint(HttpClientWrapper, RouteBuilder, id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using iRLeagueApiCore.Client.Http;
using iRLeagueApiCore.Client.QueryBuilder;
using iRLeagueApiCore.Client.Results;
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
internal sealed class ChampionshipByIdEndpoint : UpdateEndpoint<ChampionshipModel, PutChampionshipModel>, IChampionshipByIdEndpoint, ISeasonChampionshipByIdEndpoint
{
public ChampionshipByIdEndpoint(HttpClientWrapper httpClientWrapper, RouteBuilder routeBuilder, long id) :
base(httpClientWrapper, routeBuilder)
{
RouteBuilder.AddParameter(id);
}

IChampionshipChampSeasonsEndpoint IChampionshipByIdEndpoint.ChampSeasons()
{
return new ChampSeasonsEndpoint(HttpClientWrapper, RouteBuilder);
}

async Task<ClientActionResult<ChampSeasonModel>> IGetEndpoint<ChampSeasonModel>.Get(CancellationToken cancellationToken)
{
return await HttpClientWrapper.GetAsClientActionResult<ChampSeasonModel>(QueryUrl, cancellationToken);
}

async Task<ClientActionResult<ChampSeasonModel>> IPostEndpoint<ChampSeasonModel, PostChampSeasonModel>.Post(PostChampSeasonModel model, CancellationToken cancellationToken)
{
return await HttpClientWrapper.PostAsClientActionResult<ChampSeasonModel>(QueryUrl, model, cancellationToken);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using iRLeagueApiCore.Client.Http;
using iRLeagueApiCore.Client.QueryBuilder;
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
internal sealed class ChampionshipsEndpoint : PostGetAllEndpoint<ChampionshipModel, PostChampionshipModel>, IChampionshipsEndpoint, ISeasonChampionshipsEndpoint
{
public ChampionshipsEndpoint(HttpClientWrapper httpClientWrapper, RouteBuilder routeBuilder) :
base(httpClientWrapper, routeBuilder)
{
RouteBuilder.AddEndpoint("Championships");
}

IChampionshipByIdEndpoint IWithIdEndpoint<IChampionshipByIdEndpoint, long>.WithId(long id)
{
return new ChampionshipByIdEndpoint(HttpClientWrapper, RouteBuilder, id);
}

ISeasonChampionshipByIdEndpoint IWithIdEndpoint<ISeasonChampionshipByIdEndpoint, long>.WithId(long id)
{
return new ChampionshipByIdEndpoint(HttpClientWrapper, RouteBuilder, id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using iRLeagueApiCore.Client.Endpoints;
using iRLeagueApiCore.Common.Models;

public interface IChampSeasonByIdEndpoint : IUpdateEndpoint<ChampSeasonModel, PutChampSeasonModel>
{
public IPostEndpoint<ResultConfigModel, PostResultConfigModel> ResultConfigs();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using iRLeagueApiCore.Client.Endpoints;

public interface IChampSeasonsEndpoint : IWithIdEndpoint<IChampSeasonByIdEndpoint>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;

public interface IChampionshipByIdEndpoint : IUpdateEndpoint<ChampionshipModel, PutChampionshipModel>
{
public IChampionshipChampSeasonsEndpoint ChampSeasons();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
public interface IChampionshipChampSeasonsEndpoint : IGetAllEndpoint<ChampSeasonModel>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
public interface IChampionshipsEndpoint : IPostGetAllEndpoint<ChampionshipModel, PostChampionshipModel>, IWithIdEndpoint<IChampionshipByIdEndpoint>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;
public interface ISeasonChampSeasonsEndpoint : IGetAllEndpoint<ChampSeasonModel>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using iRLeagueApiCore.Common.Models;

namespace iRLeagueApiCore.Client.Endpoints.Championships;

public interface ISeasonChampionshipByIdEndpoint : IPostEndpoint<ChampSeasonModel, PostChampSeasonModel>, IGetEndpoint<ChampSeasonModel>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace iRLeagueApiCore.Client.Endpoints.Championships;
public interface ISeasonChampionshipsEndpoint : IWithIdEndpoint<ISeasonChampionshipByIdEndpoint>
{
}
28 changes: 28 additions & 0 deletions src/iRLeagueApiCore.Client/Endpoints/CustomEndpoint.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using iRLeagueApiCore.Client.Http;
using iRLeagueApiCore.Client.QueryBuilder;
using iRLeagueApiCore.Client.Results;

namespace iRLeagueApiCore.Client.Endpoints;

internal sealed class CustomEndpoint<T> : UpdateEndpoint<T, object>, ICustomEndpoint<T>
{
public CustomEndpoint(HttpClientWrapper httpClientWrapper, RouteBuilder routeBuilder, string route) : base(httpClientWrapper, routeBuilder)
{
RouteBuilder.AddEndpoint(route);
}

async Task<ClientActionResult<T>> IPostEndpoint<T, object>.Post(object model, CancellationToken cancellationToken)
{
return await HttpClientWrapper.PostAsClientActionResult<T>(QueryUrl, model, cancellationToken);
}

async Task<ClientActionResult<T>> IPostEndpoint<T>.Post(CancellationToken cancellationToken)
{
return await HttpClientWrapper.PostAsClientActionResult<T>(QueryUrl, null, cancellationToken);
}

async Task<ClientActionResult<IEnumerable<T>>> ICustomEndpoint<T>.GetAll(CancellationToken cancellationToken)
{
return await HttpClientWrapper.GetAsClientActionResult<IEnumerable<T>>(QueryUrl, cancellationToken);
}
}
Loading
Loading