Commit 2ef87996 authored by Almouhannad's avatar Almouhannad

(B) Rename notifications services project

parent 85554f52
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Application\Application.csproj" /> <ProjectReference Include="..\Application\Application.csproj" />
<ProjectReference Include="..\Domain\Domain.csproj" /> <ProjectReference Include="..\Domain\Domain.csproj" />
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj" /> <ProjectReference Include="..\Infrastructure\NotificationsService.csproj" />
<ProjectReference Include="..\Persistence\Persistence.csproj" /> <ProjectReference Include="..\Persistence\Persistence.csproj" />
<ProjectReference Include="..\Presentation\Presentation.csproj" /> <ProjectReference Include="..\Presentation\Presentation.csproj" />
</ItemGroup> </ItemGroup>
......
...@@ -3,13 +3,12 @@ using API.Options.JWT; ...@@ -3,13 +3,12 @@ using API.Options.JWT;
using API.SeedDatabaseHelper; using API.SeedDatabaseHelper;
using Application.Behaviors; using Application.Behaviors;
using FluentValidation; using FluentValidation;
using Infrastructure;
using Infrastructure.NotificationsHubs;
using MediatR; using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using NotificationsService.NotificationsHubs;
using Persistence.Context; using Persistence.Context;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
...@@ -55,8 +54,9 @@ builder ...@@ -55,8 +54,9 @@ builder
.Services .Services
.Scan( .Scan(
selector => selector selector => selector
.FromAssemblies(Persistence.AssemblyReference.Assembly, .FromAssemblies(
Infrastructure.AssemblyReference.Assembly Persistence.AssemblyReference.Assembly,
NotificationsService.AssemblyReference.Assembly
) )
.AddClasses(false) .AddClasses(false)
.AsImplementedInterfaces() .AsImplementedInterfaces()
......
...@@ -21,11 +21,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Persistence", "Persistence\ ...@@ -21,11 +21,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Persistence", "Persistence\
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API", "API\API.csproj", "{15B2AA13-EBBD-408B-A4B3-4BAB43D74267}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API", "API\API.csproj", "{15B2AA13-EBBD-408B-A4B3-4BAB43D74267}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{4EB41743-695F-4822-87F6-E6F9B48A8E6B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationsService", "Infrastructure\NotificationsService.csproj", "{4EB41743-695F-4822-87F6-E6F9B48A8E6B}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{05E390C6-AFE5-42FB-A3E2-CEEE1E6A75EE}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{05E390C6-AFE5-42FB-A3E2-CEEE1E6A75EE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchitectureTests", "ArchitectureTests\ArchitectureTests.csproj", "{07C6D0DB-7181-4E6F-9BC1-863FCDAD9490}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchitectureTests", "ArchitectureTests\ArchitectureTests.csproj", "{07C6D0DB-7181-4E6F-9BC1-863FCDAD9490}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
...@@ -73,6 +73,7 @@ Global ...@@ -73,6 +73,7 @@ Global
{CE41FA28-76D7-4DC0-A980-B953F87253F5} = {6FC36DEB-2BC3-4980-B46B-7E518DAF09BF} {CE41FA28-76D7-4DC0-A980-B953F87253F5} = {6FC36DEB-2BC3-4980-B46B-7E518DAF09BF}
{D04C0D6C-3FC9-4359-A017-DFCFA1475639} = {878AE2C9-3E34-4332-ACC0-E6B601085710} {D04C0D6C-3FC9-4359-A017-DFCFA1475639} = {878AE2C9-3E34-4332-ACC0-E6B601085710}
{2B5111ED-7AB8-46E2-90F8-AF0C70265618} = {FDA56BCD-A53D-4BA1-A59D-3F44FA32DDD7} {2B5111ED-7AB8-46E2-90F8-AF0C70265618} = {FDA56BCD-A53D-4BA1-A59D-3F44FA32DDD7}
{15B2AA13-EBBD-408B-A4B3-4BAB43D74267} = {26CA1441-8533-428E-9DD2-26F2FB428488}
{4EB41743-695F-4822-87F6-E6F9B48A8E6B} = {FDA56BCD-A53D-4BA1-A59D-3F44FA32DDD7} {4EB41743-695F-4822-87F6-E6F9B48A8E6B} = {FDA56BCD-A53D-4BA1-A59D-3F44FA32DDD7}
{07C6D0DB-7181-4E6F-9BC1-863FCDAD9490} = {05E390C6-AFE5-42FB-A3E2-CEEE1E6A75EE} {07C6D0DB-7181-4E6F-9BC1-863FCDAD9490} = {05E390C6-AFE5-42FB-A3E2-CEEE1E6A75EE}
EndGlobalSection EndGlobalSection
......
using Application.Abstractions.Notifications; using Application.Abstractions.Notifications;
namespace Infrastructure.Abstractions; namespace NotificationsService.Abstractions;
public interface INotificationClient public interface INotificationClient
{ {
......
using System.Reflection; using System.Reflection;
namespace Infrastructure; namespace NotificationsService;
public class AssemblyReference public class AssemblyReference
{ {
......
using Infrastructure.Abstractions; using Microsoft.AspNetCore.SignalR;
using Microsoft.AspNetCore.SignalR; using NotificationsService.Abstractions;
namespace Infrastructure.NotificationsHubs; namespace NotificationsService.NotificationsHubs;
public class DoctorsNotificationsHub : Hub<INotificationClient> public class DoctorsNotificationsHub : Hub<INotificationClient>
{ {
......
using Infrastructure.Abstractions; using Microsoft.AspNetCore.SignalR;
using Microsoft.AspNetCore.SignalR; using NotificationsService.Abstractions;
namespace Infrastructure.NotificationsHubs; namespace NotificationsService.NotificationsHubs;
public class ReceptionistsNotificationsHub : Hub<INotificationClient> public class ReceptionistsNotificationsHub : Hub<INotificationClient>
{ {
......
using Application.Notifications.Doctors; using Application.Notifications.Doctors;
using Application.Notifications.Doctors.NewVisitNotifications; using Application.Notifications.Doctors.NewVisitNotifications;
using Infrastructure.Abstractions;
using Infrastructure.NotificationsHubs;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
using NotificationsService.Abstractions;
using NotificationsService.NotificationsHubs;
namespace Infrastructure.NotificationsServices.Doctors; namespace NotificationsService.NotificationsServices.Doctors;
public class DoctorsNotificationsService : IDoctorsNotificationService public class DoctorsNotificationsService : IDoctorsNotificationService
{ {
...@@ -16,7 +16,7 @@ public class DoctorsNotificationsService : IDoctorsNotificationService ...@@ -16,7 +16,7 @@ public class DoctorsNotificationsService : IDoctorsNotificationService
_context = context; _context = context;
} }
#endregion #endregion
public async Task SendNewVisitNotification(NewVisitNotification notification) public async Task SendNewVisitNotification(NewVisitNotification notification)
{ {
await _context.Clients.All.ReceiveNotification(notification); await _context.Clients.All.ReceiveNotification(notification);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment