Skip to content

Commit d67c77a

Browse files
committed
Move and clean models in preparation of moving subscribe in WA
1 parent a146daa commit d67c77a

File tree

15 files changed

+61
-13
lines changed

15 files changed

+61
-13
lines changed

Joinrpg.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JoinRpg.BlobStorage", "src\
105105
EndProject
106106
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JoinRpg.WebComponents", "src\JoinRpg.WebComponents\JoinRpg.WebComponents.csproj", "{80AF606D-0576-480E-8D2E-AE736C2EE73C}"
107107
EndProject
108+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JoinRpg.Web.GameSubscribe", "src\JoinRpg.Web.GameSubscribe\JoinRpg.Web.GameSubscribe.csproj", "{C5FDCE34-6DE6-444A-B066-3F80D0527053}"
109+
EndProject
108110
Global
109111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
110112
Debug|Any CPU = Debug|Any CPU
@@ -267,6 +269,10 @@ Global
267269
{80AF606D-0576-480E-8D2E-AE736C2EE73C}.Debug|Any CPU.Build.0 = Debug|Any CPU
268270
{80AF606D-0576-480E-8D2E-AE736C2EE73C}.Release|Any CPU.ActiveCfg = Release|Any CPU
269271
{80AF606D-0576-480E-8D2E-AE736C2EE73C}.Release|Any CPU.Build.0 = Release|Any CPU
272+
{C5FDCE34-6DE6-444A-B066-3F80D0527053}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
273+
{C5FDCE34-6DE6-444A-B066-3F80D0527053}.Debug|Any CPU.Build.0 = Debug|Any CPU
274+
{C5FDCE34-6DE6-444A-B066-3F80D0527053}.Release|Any CPU.ActiveCfg = Release|Any CPU
275+
{C5FDCE34-6DE6-444A-B066-3F80D0527053}.Release|Any CPU.Build.0 = Release|Any CPU
270276
EndGlobalSection
271277
GlobalSection(SolutionProperties) = preSolution
272278
HideSolutionNode = FALSE
@@ -302,6 +308,7 @@ Global
302308
{AC09C4CB-0D6C-4301-A4BF-8129A9881BE5} = {B8A1A61E-CD98-49F5-98BA-30B0869576B1}
303309
{3623C97E-251A-4233-A359-18F76F9598C8} = {7645AC35-A68C-40EF-8AAD-1BF62D822E4C}
304310
{80AF606D-0576-480E-8D2E-AE736C2EE73C} = {B3BB8906-62C8-44A0-822C-566A144C05AE}
311+
{C5FDCE34-6DE6-444A-B066-3F80D0527053} = {B3BB8906-62C8-44A0-822C-566A144C05AE}
305312
EndGlobalSection
306313
GlobalSection(ExtensibilityGlobals) = postSolution
307314
SolutionGuid = {1A5E4F92-A0F4-4350-92C7-361C88D58588}

src/JoinRpg.DI/JoinrpgMainModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected override void Load(ContainerBuilder builder)
1717
{
1818
_ = builder.RegisterTypes(RepositoriesRegistraton.GetTypes().ToArray()).AsImplementedInterfaces();
1919
_ = builder.RegisterTypes(Services.Impl.Services.GetTypes().ToArray()).AsImplementedInterfaces();
20-
_ = builder.RegisterTypes(WebPortal.Managers.Registration.GetTypes().ToArray()).AsSelf();
20+
_ = builder.RegisterTypes(WebPortal.Managers.Registration.GetTypes().ToArray()).AsSelf().AsImplementedInterfaces();
2121

2222
_ = builder.RegisterType<ExportDataServiceImpl>().As<IExportDataService>();
2323
_ = builder.RegisterType<EmailServiceImpl>().As<IEmailService>();

src/JoinRpg.Portal/Controllers/GameSubscribeController.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using JoinRpg.Portal.Infrastructure.Authentication;
88
using JoinRpg.Portal.Infrastructure.Authorization;
99
using JoinRpg.Services.Interfaces;
10+
using JoinRpg.Web.GameSubscribe;
1011
using JoinRpg.Web.Models;
1112
using JoinRpg.Web.Models.Subscribe;
1213
using JoinRpg.WebPortal.Managers.Subscribe;
@@ -21,31 +22,33 @@ public class GameSubscribeController : Common.ControllerGameBase
2122
private readonly IUserSubscribeRepository userSubscribeRepository;
2223
private readonly IUserRepository userRepository;
2324
private readonly IUriService uriService;
24-
private readonly SubscribeViewService subscribeViewService;
25+
private readonly IGameSubscribeClient subscribeClient;
2526

2627
public GameSubscribeController(
2728
IUserSubscribeRepository userSubscribeRepository,
2829
IUserRepository userRepository,
2930
IUriService uriService,
3031
IProjectRepository projectRepository,
3132
IProjectService projectService,
32-
SubscribeViewService subscribeViewService)
33+
IGameSubscribeClient subscribeClient
34+
)
3335
: base(projectRepository, projectService, userRepository)
3436
{
3537
this.userSubscribeRepository = userSubscribeRepository;
3638
this.userRepository = userRepository;
3739
this.uriService = uriService;
38-
this.subscribeViewService = subscribeViewService;
40+
this.subscribeClient = subscribeClient;
3941
}
4042

4143
[HttpGet("{masterId}")]
4244
public async Task<ActionResult> ByMaster(int projectId, int masterId)
4345
{
44-
var subscribeViewModel = await subscribeViewService.GetSubscribeForMaster(projectId, masterId);
46+
var subscribeViewModel = await subscribeClient.GetSubscribeForMaster(projectId, masterId);
4547

4648
var user = await UserRepository.GetById(masterId);
4749
var currentUser = await userRepository.GetById(User.GetUserIdOrDefault()!.Value);
4850

51+
4952
return View(
5053
new SubscribeByMasterPageViewModel(
5154
new UserProfileDetailsViewModel(user, currentUser),

src/JoinRpg.Portal/Views/GameSubscribe/_SubscribeOptions.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@using JoinRpg.Web.Models.Subscribe
1+
@using JoinRpg.Web.GameSubscribe
22
@model SubscribeOptionsViewModel
33
@{
44
SubscribeOptionsViewModel disabledFlags = new SubscribeOptionsViewModel();
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using System.Threading.Tasks;
2+
3+
namespace JoinRpg.Web.GameSubscribe
4+
{
5+
public interface IGameSubscribeClient
6+
{
7+
Task<SubscribeListViewModel> GetSubscribeForMaster(int projectId, int masterId);
8+
}
9+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net5.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
8+
<ItemGroup>
9+
<SupportedPlatform Include="browser" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.5" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<Folder Include="wwwroot\" />
18+
</ItemGroup>
19+
20+
<ItemGroup>
21+
<ProjectReference Include="..\JoinRpg.WebComponents\JoinRpg.WebComponents.csproj" />
22+
<ProjectReference Include="..\JoinRpg.PrimitiveTypes\JoinRpg.PrimitiveTypes.csproj" />
23+
</ItemGroup>
24+
25+
</Project>

src/JoinRpg.WebPortal.Models/Subscribe/SubscribeListItemViewModel.cs renamed to src/JoinRpg.Web.GameSubscribe/SubscribeListItemViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace JoinRpg.Web.Models.Subscribe
3+
namespace JoinRpg.Web.GameSubscribe
44
{
55
public class SubscribeListItemViewModel
66
{

src/JoinRpg.WebPortal.Models/Subscribe/SubscribeListViewModel.cs renamed to src/JoinRpg.Web.GameSubscribe/SubscribeListViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace JoinRpg.Web.Models.Subscribe
1+
namespace JoinRpg.Web.GameSubscribe
22
{
33
public class SubscribeListViewModel
44
{

src/JoinRpg.WebPortal.Models/Subscribe/SubscribeOptionsViewModel.cs renamed to src/JoinRpg.Web.GameSubscribe/SubscribeOptionsViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel.DataAnnotations;
22
using JoinRpg.DataModel;
33

4-
namespace JoinRpg.Web.Models.Subscribe
4+
namespace JoinRpg.Web.GameSubscribe
55
{
66
public class SubscribeOptionsViewModel : ISubscriptionOptions
77
{

src/JoinRpg.WebPortal.Managers/JoinRpg.WebPortal.Managers.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
<PropertyGroup>
44
<TargetFramework>net5</TargetFramework>
55
</PropertyGroup>
6-
7-
<ItemGroup>
8-
</ItemGroup>
96

107
<ItemGroup>
8+
<ProjectReference Include="..\JoinRpg.Web.GameSubscribe\JoinRpg.Web.GameSubscribe.csproj" />
119
<ProjectReference Include="..\JoinRpg.Interfaces\JoinRpg.Interfaces.csproj" />
1210
<ProjectReference Include="..\JoinRpg.WebPortal.Models\JoinRpg.WebPortal.Models.csproj" />
1311
</ItemGroup>

0 commit comments

Comments
 (0)