Skip to content

Commit

Permalink
Create project structure for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
achobanov committed Sep 20, 2023
1 parent 4b515d0 commit 4858a30
Show file tree
Hide file tree
Showing 134 changed files with 3,927 additions and 0 deletions.
109 changes: 109 additions & 0 deletions src/endurance-management-system.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,43 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Witness", "Witness\EMS.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Application", "Core.Application\Core.Application.csproj", "{6CBBB44C-40A5-4040-A771-C501A3486C1C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "v4", "v4", "{5C8BA03B-623F-4A4D-988B-851A4E5D0324}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Domain", "v4\EMS.Domain\EMS.Domain.csproj", "{560C4A13-3128-40F7-BDA0-CDB183C71767}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Domain.Core", "v4\EMS.Domain.Core\EMS.Domain.Core.csproj", "{4BBAB7B1-577F-441C-93D2-C4FE3B891BDB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Domain.Setup", "v4\EMS.Domain.Setup\EMS.Domain.Setup.csproj", "{866C8E44-1E56-47CE-B7CD-48DB02A7CD88}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Domain.Watcher", "v4\EMS.Domain.Watcher\EMS.Domain.Watcher.csproj", "{75A38DD3-ED26-4E59-946A-43854C3B9B73}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Judge", "Judge", "{35F61047-DE3E-46D3-B125-DCE4AF783A33}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Witness", "Witness", "{364DDF5F-03E3-4215-94E4-73AA564CB4CE}"
ProjectSection(SolutionItems) = preProject
v4\Witness\EMS.Witness\EMS.Witness.csproj = v4\Witness\EMS.Witness\EMS.Witness.csproj
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Common", "v4\EMS.Common\EMS.Common.csproj", "{9C709175-C7D7-48B3-A1A9-C3F69F724440}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{06233005-CC56-4846-8760-F7AFF5F72F4C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common", "v4\Common\Common\Common.csproj", "{423C3729-580F-41B6-BA13-A04C19B1C6EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Blazor", "v4\Common\Common.Blazor\Common.Blazor.csproj", "{968B425D-E147-490F-AAB2-F54E7D243D66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Domain", "v4\Common\Common.Domain\Common.Domain.csproj", "{67919EB4-E3E4-4897-9E05-09BEE6F7D7B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Judge", "v4\Judge\EMS.Judge\EMS.Judge.csproj", "{08A7F695-4FC6-4345-96F8-94BE1E02C8CC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Judge.Server", "v4\Judge\EMS.Judge.Server\EMS.Judge.Server.csproj", "{D7D0CC40-602B-43A4-B304-0022F066C1C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Judge.UI", "v4\Judge\EMS.Judge.UI\EMS.Judge.UI.csproj", "{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EMS.Witness.UI", "v4\Witness\EMS.Witness.UI\EMS.Witness.UI.csproj", "{25E5AAB4-E41F-4883-80AE-AF10CC73775F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EMS.Persistence", "v4\EMS.Persistance\EMS.Persistence.csproj", "{B85BA4E0-4692-437B-AEBD-09410343358E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -75,6 +112,62 @@ Global
{6CBBB44C-40A5-4040-A771-C501A3486C1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CBBB44C-40A5-4040-A771-C501A3486C1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CBBB44C-40A5-4040-A771-C501A3486C1C}.Release|Any CPU.Build.0 = Release|Any CPU
{560C4A13-3128-40F7-BDA0-CDB183C71767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{560C4A13-3128-40F7-BDA0-CDB183C71767}.Debug|Any CPU.Build.0 = Debug|Any CPU
{560C4A13-3128-40F7-BDA0-CDB183C71767}.Release|Any CPU.ActiveCfg = Release|Any CPU
{560C4A13-3128-40F7-BDA0-CDB183C71767}.Release|Any CPU.Build.0 = Release|Any CPU
{4BBAB7B1-577F-441C-93D2-C4FE3B891BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BBAB7B1-577F-441C-93D2-C4FE3B891BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BBAB7B1-577F-441C-93D2-C4FE3B891BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BBAB7B1-577F-441C-93D2-C4FE3B891BDB}.Release|Any CPU.Build.0 = Release|Any CPU
{866C8E44-1E56-47CE-B7CD-48DB02A7CD88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{866C8E44-1E56-47CE-B7CD-48DB02A7CD88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{866C8E44-1E56-47CE-B7CD-48DB02A7CD88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{866C8E44-1E56-47CE-B7CD-48DB02A7CD88}.Release|Any CPU.Build.0 = Release|Any CPU
{75A38DD3-ED26-4E59-946A-43854C3B9B73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75A38DD3-ED26-4E59-946A-43854C3B9B73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75A38DD3-ED26-4E59-946A-43854C3B9B73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75A38DD3-ED26-4E59-946A-43854C3B9B73}.Release|Any CPU.Build.0 = Release|Any CPU
{9C709175-C7D7-48B3-A1A9-C3F69F724440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C709175-C7D7-48B3-A1A9-C3F69F724440}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C709175-C7D7-48B3-A1A9-C3F69F724440}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C709175-C7D7-48B3-A1A9-C3F69F724440}.Release|Any CPU.Build.0 = Release|Any CPU
{423C3729-580F-41B6-BA13-A04C19B1C6EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{423C3729-580F-41B6-BA13-A04C19B1C6EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{423C3729-580F-41B6-BA13-A04C19B1C6EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{423C3729-580F-41B6-BA13-A04C19B1C6EF}.Release|Any CPU.Build.0 = Release|Any CPU
{968B425D-E147-490F-AAB2-F54E7D243D66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{968B425D-E147-490F-AAB2-F54E7D243D66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{968B425D-E147-490F-AAB2-F54E7D243D66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{968B425D-E147-490F-AAB2-F54E7D243D66}.Release|Any CPU.Build.0 = Release|Any CPU
{67919EB4-E3E4-4897-9E05-09BEE6F7D7B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67919EB4-E3E4-4897-9E05-09BEE6F7D7B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67919EB4-E3E4-4897-9E05-09BEE6F7D7B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67919EB4-E3E4-4897-9E05-09BEE6F7D7B1}.Release|Any CPU.Build.0 = Release|Any CPU
{08A7F695-4FC6-4345-96F8-94BE1E02C8CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08A7F695-4FC6-4345-96F8-94BE1E02C8CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08A7F695-4FC6-4345-96F8-94BE1E02C8CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08A7F695-4FC6-4345-96F8-94BE1E02C8CC}.Release|Any CPU.Build.0 = Release|Any CPU
{D7D0CC40-602B-43A4-B304-0022F066C1C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7D0CC40-602B-43A4-B304-0022F066C1C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7D0CC40-602B-43A4-B304-0022F066C1C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7D0CC40-602B-43A4-B304-0022F066C1C2}.Release|Any CPU.Build.0 = Release|Any CPU
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}.Release|Any CPU.Build.0 = Release|Any CPU
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D}.Release|Any CPU.Deploy.0 = Release|Any CPU
{25E5AAB4-E41F-4883-80AE-AF10CC73775F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25E5AAB4-E41F-4883-80AE-AF10CC73775F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25E5AAB4-E41F-4883-80AE-AF10CC73775F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{25E5AAB4-E41F-4883-80AE-AF10CC73775F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25E5AAB4-E41F-4883-80AE-AF10CC73775F}.Release|Any CPU.Build.0 = Release|Any CPU
{25E5AAB4-E41F-4883-80AE-AF10CC73775F}.Release|Any CPU.Deploy.0 = Release|Any CPU
{B85BA4E0-4692-437B-AEBD-09410343358E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B85BA4E0-4692-437B-AEBD-09410343358E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B85BA4E0-4692-437B-AEBD-09410343358E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B85BA4E0-4692-437B-AEBD-09410343358E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -84,6 +177,22 @@ Global
{F274D231-5E45-4F0F-89E1-8200B7020DAA} = {AAF4F31D-28A8-48B7-86A3-E5B3AC61E44D}
{A789D67A-4D7D-40D4-9ACE-21EA327A0DC6} = {AAF4F31D-28A8-48B7-86A3-E5B3AC61E44D}
{F65ACC8D-BC3F-4BB0-A075-9CE378BA470E} = {4EE12CA9-8D28-4523-A3AA-780E02B6AF19}
{560C4A13-3128-40F7-BDA0-CDB183C71767} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{4BBAB7B1-577F-441C-93D2-C4FE3B891BDB} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{866C8E44-1E56-47CE-B7CD-48DB02A7CD88} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{75A38DD3-ED26-4E59-946A-43854C3B9B73} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{35F61047-DE3E-46D3-B125-DCE4AF783A33} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{364DDF5F-03E3-4215-94E4-73AA564CB4CE} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{9C709175-C7D7-48B3-A1A9-C3F69F724440} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{06233005-CC56-4846-8760-F7AFF5F72F4C} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
{423C3729-580F-41B6-BA13-A04C19B1C6EF} = {06233005-CC56-4846-8760-F7AFF5F72F4C}
{968B425D-E147-490F-AAB2-F54E7D243D66} = {06233005-CC56-4846-8760-F7AFF5F72F4C}
{67919EB4-E3E4-4897-9E05-09BEE6F7D7B1} = {06233005-CC56-4846-8760-F7AFF5F72F4C}
{08A7F695-4FC6-4345-96F8-94BE1E02C8CC} = {35F61047-DE3E-46D3-B125-DCE4AF783A33}
{D7D0CC40-602B-43A4-B304-0022F066C1C2} = {35F61047-DE3E-46D3-B125-DCE4AF783A33}
{9A0DD55F-8CAA-48E9-9224-30FB3FAE726D} = {35F61047-DE3E-46D3-B125-DCE4AF783A33}
{25E5AAB4-E41F-4883-80AE-AF10CC73775F} = {364DDF5F-03E3-4215-94E4-73AA564CB4CE}
{B85BA4E0-4692-437B-AEBD-09410343358E} = {5C8BA03B-623F-4A4D-988B-851A4E5D0324}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3CB609D9-5D54-4C11-A371-DAAC8B74E430}
Expand Down
20 changes: 20 additions & 0 deletions src/v4/Common/Common.Blazor/Common.Blazor.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Common.Blazor;

// All the code in this file is only included on Android.
public class PlatformClass1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Common.Blazor;

// All the code in this file is only included on Mac Catalyst.
public class PlatformClass1
{
}
7 changes: 7 additions & 0 deletions src/v4/Common/Common.Blazor/Platforms/Tizen/PlatformClass1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using System;

namespace Common.Blazor;
// All the code in this file is only included on Tizen.
public class PlatformClass1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Common.Blazor;

// All the code in this file is only included on Windows.
public class PlatformClass1
{
}
6 changes: 6 additions & 0 deletions src/v4/Common/Common.Blazor/Platforms/iOS/PlatformClass1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Common.Blazor;

// All the code in this file is only included on iOS.
public class PlatformClass1
{
}
9 changes: 9 additions & 0 deletions src/v4/Common/Common.Domain/Common.Domain.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
13 changes: 13 additions & 0 deletions src/v4/Common/Common/Common.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions src/v4/Common/Common/Conventions/IScopedService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Common.Conventions;

public interface IScopedService
{
}
6 changes: 6 additions & 0 deletions src/v4/Common/Common/Conventions/ISingletonService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Common.Conventions;

public interface ISingletonService
{
Task ResetState();
}
5 changes: 5 additions & 0 deletions src/v4/Common/Common/Conventions/ITransientService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Common.Conventions;

public interface ITransientService
{
}
73 changes: 73 additions & 0 deletions src/v4/Common/Common/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
using Common.Conventions;
using Microsoft.Extensions.DependencyInjection;
using System.Reflection;

namespace Common.Extensions;

public static class ServiceCollectionExtensions
{
private static Type TransientType = typeof(ITransientService);
private static Type ScopedType = typeof(IScopedService);
private static Type SingletonType = typeof(ISingletonService);

public static IServiceCollection AddConventionalServices(this IServiceCollection services)
{
var callingAssembly = Assembly.GetCallingAssembly();
var referencedAssemblies = callingAssembly.GetReferencedAssemblies().Select(Assembly.Load);
var assemblies = referencedAssemblies.Concat(new List<Assembly> { callingAssembly });

var interfaces = assemblies.SelectMany(x => x
.GetTypes()
.Where(y => y.IsInterface && y.IsConventionalService()));
var classes = assemblies.SelectMany(x => x
.GetTypes()
.Where(y => !y.IsInterface && !y.IsAbstract));
foreach (var i in interfaces)
{
foreach (var c in classes)
{
if (i.IsAssignableFrom(c))
{
if (i.IsTransient())
{
services.AddTransient(i, c);
}
if (i.IsScoped())
{
services.AddScoped(i, c);
}
if (i.IsSingleton())
{
services.AddSingleton(i, c);
}
}
}
}

return services;
}

private static bool IsConventionalService(this Type type)
{
var isTransient = type.IsTransient();
var isScoped = type.IsScoped();
var isSingleton = type.IsSingleton();

if (isTransient && isScoped || isTransient && isSingleton || isScoped && isSingleton)
{
throw new Exception($"'{type.FullName}' can be ONLY one of " +
$"'{nameof(ITransientService)}', '{nameof(IScopedService)}', '{nameof(ISingletonService)}' ");
}

return isTransient || isScoped || isSingleton;
}

private static bool IsTransient(this Type type)
=> TransientType.IsAssignableFrom(type);

private static bool IsScoped(this Type type)
=> ScopedType.IsAssignableFrom(type);

private static bool IsSingleton(this Type type)
=> SingletonType.IsAssignableFrom(type);
}
9 changes: 9 additions & 0 deletions src/v4/EMS.Common/EMS.Common.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
13 changes: 13 additions & 0 deletions src/v4/EMS.Domain.Core/EMS.Domain.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Common\Common\Common.csproj" />
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions src/v4/EMS.Domain.Core/Event.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace EMS.Domain.Core;

public class Event
{
public Guid Id { get; set; }
public string Name { get; set; } = null!;
}
8 changes: 8 additions & 0 deletions src/v4/EMS.Domain.Core/Ports/IEventRepository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Common.Conventions;

namespace EMS.Domain.Core.Ports;

public interface IEventRepository : ITransientService
{
Task<Event> Get(Guid id);
}
9 changes: 9 additions & 0 deletions src/v4/EMS.Domain.Setup/EMS.Domain.Setup.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
9 changes: 9 additions & 0 deletions src/v4/EMS.Domain.Watcher/EMS.Domain.Watcher.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
9 changes: 9 additions & 0 deletions src/v4/EMS.Domain/EMS.Domain.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
12 changes: 12 additions & 0 deletions src/v4/EMS.Persistance/Adapters/EventRepository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using EMS.Domain.Core;
using EMS.Domain.Core.Ports;

namespace EMS.Persistence.Adapters;

public class EventRepository : IEventRepository
{
public Task<Event> Get(Guid id)
{
return Task.FromResult(new Event { Id = id } );
}
}
Loading

0 comments on commit 4858a30

Please sign in to comment.