diff --git a/src/Armory.Api/Extensions/Application.cs b/src/Armory.Api/Extensions/Application.cs index fbf2e31f..93faa18e 100644 --- a/src/Armory.Api/Extensions/Application.cs +++ b/src/Armory.Api/Extensions/Application.cs @@ -1,89 +1,13 @@ -using Armory.Armament.Ammunition.Application.CheckExists; -using Armory.Armament.Ammunition.Application.Create; -using Armory.Armament.Ammunition.Application.Find; -using Armory.Armament.Ammunition.Application.SearchAll; -using Armory.Armament.Ammunition.Application.SearchAllByFlight; -using Armory.Armament.Equipments.Application.CheckExists; -using Armory.Armament.Equipments.Application.Create; -using Armory.Armament.Equipments.Application.Find; -using Armory.Armament.Equipments.Application.SearchAll; -using Armory.Armament.Equipments.Application.SearchAllByFlight; -using Armory.Armament.Equipments.Application.Update; -using Armory.Armament.Explosives.Application.CheckExists; -using Armory.Armament.Explosives.Application.Create; -using Armory.Armament.Explosives.Application.Find; -using Armory.Armament.Explosives.Application.SearchAll; -using Armory.Armament.Explosives.Application.SearchAllByFlight; -using Armory.Armament.Explosives.Application.Update; -using Armory.Armament.Weapons.Application.AssignHolder; -using Armory.Armament.Weapons.Application.CheckExists; -using Armory.Armament.Weapons.Application.Create; -using Armory.Armament.Weapons.Application.Find; -using Armory.Armament.Weapons.Application.GenerateQR; -using Armory.Armament.Weapons.Application.SearchAll; -using Armory.Armament.Weapons.Application.SearchAllByFlight; -using Armory.Armament.Weapons.Application.Update; -using Armory.Degrees.Application.Create; -using Armory.Degrees.Application.Find; -using Armory.Degrees.Application.SearchAll; -using Armory.Degrees.Application.SearchAllByRank; -using Armory.Fireteams.Application.CheckExists; -using Armory.Fireteams.Application.Create; -using Armory.Fireteams.Application.Find; -using Armory.Fireteams.Application.SearchAll; -using Armory.Fireteams.Application.SearchAllByFlight; -using Armory.Fireteams.Application.UpdateCommander; -using Armory.Flights.Application.CheckExists; -using Armory.Flights.Application.Create; -using Armory.Flights.Application.Find; -using Armory.Flights.Application.SearchAll; -using Armory.Flights.Application.UpdateCommander; -using Armory.Formats.AssignedWeaponMagazineFormats.Application.AddItem; -using Armory.Formats.AssignedWeaponMagazineFormats.Application.Create; -using Armory.Formats.AssignedWeaponMagazineFormats.Application.Find; -using Armory.Formats.AssignedWeaponMagazineFormats.Application.Generate; -using Armory.Formats.WarMaterialAndSpecialEquipmentAssignmentFormats.Application.Create; -using Armory.Formats.WarMaterialAndSpecialEquipmentAssignmentFormats.Application.Find; -using Armory.Formats.WarMaterialAndSpecialEquipmentAssignmentFormats.Application.Generate; -using Armory.Formats.WarMaterialDeliveryCertificateFormats.Application.Create; -using Armory.Formats.WarMaterialDeliveryCertificateFormats.Application.Find; -using Armory.Formats.WarMaterialDeliveryCertificateFormats.Application.Generate; -using Armory.People.Application.CheckExists; -using Armory.People.Application.Create; -using Armory.People.Application.Delete; -using Armory.People.Application.Find; -using Armory.People.Application.SearchAll; -using Armory.People.Application.SearchAllByRank; -using Armory.People.Application.SearchAllByRole; -using Armory.People.Application.SearchByArmoryUserId; -using Armory.People.Application.Update; -using Armory.People.Application.UpdateDegree; -using Armory.Ranks.Application.Create; -using Armory.Ranks.Application.Find; -using Armory.Ranks.Application.SearchAll; -using Armory.Squads.Application.CheckExists; -using Armory.Squads.Application.Create; -using Armory.Squads.Application.Find; -using Armory.Squads.Application.SearchAll; -using Armory.Squads.Application.UpdateCommander; -using Armory.Troopers.Application.CheckExists; -using Armory.Troopers.Application.Create; -using Armory.Troopers.Application.Find; -using Armory.Troopers.Application.SearchAll; -using Armory.Troopers.Application.SearchAllByFireteam; -using Armory.Troopers.Application.Update; -using Armory.Troopers.Application.UpdateFireTeam; -using Armory.Users.Application.AddToRole; -using Armory.Users.Application.Authenticate; -using Armory.Users.Application.ChangePassword; -using Armory.Users.Application.CheckExists; -using Armory.Users.Application.ConfirmEmail; -using Armory.Users.Application.Create; -using Armory.Users.Application.GenerateEmailConfirmationToken; -using Armory.Users.Application.GenerateJwt; -using Armory.Users.Application.GeneratePasswordResetToken; -using Armory.Users.Application.ResetPassword; -using Armory.Users.Application.SearchAllRoles; +using Armory.Api.Extensions.DependencyInjection.Armament; +using Armory.Api.Extensions.DependencyInjection.Degrees; +using Armory.Api.Extensions.DependencyInjection.FireTeams; +using Armory.Api.Extensions.DependencyInjection.Flights; +using Armory.Api.Extensions.DependencyInjection.Formats; +using Armory.Api.Extensions.DependencyInjection.People; +using Armory.Api.Extensions.DependencyInjection.Ranks; +using Armory.Api.Extensions.DependencyInjection.Squads; +using Armory.Api.Extensions.DependencyInjection.Troopers; +using Armory.Api.Extensions.DependencyInjection.Users; using Microsoft.Extensions.DependencyInjection; namespace Armory.Api.Extensions @@ -92,116 +16,16 @@ public static class Application { public static IServiceCollection AddApplication(this IServiceCollection services) { - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services - .AddScoped(); - services - .AddScoped(); - services - .AddScoped(); - - services - .AddScoped(); - services - .AddScoped(); - services - .AddScoped(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); + services.AddArmoryUsersApplication() + .AddArmamentApplication() + .AddDegreesApplication() + .AddFireTeamsApplication() + .AddFlightsApplication() + .AddFormatsApplication() + .AddPeopleApplication() + .AddRanksApplication() + .AddSquadsApplication() + .AddTroopersApplication(); return services; } diff --git a/src/Armory.Api/Extensions/DependencyInjection/Armament/ArmamentApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Armament/ArmamentApplication.cs new file mode 100644 index 00000000..85a8959b --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Armament/ArmamentApplication.cs @@ -0,0 +1,66 @@ +using Armory.Armament.Ammunition.Application.CheckExists; +using Armory.Armament.Ammunition.Application.Create; +using Armory.Armament.Ammunition.Application.Find; +using Armory.Armament.Ammunition.Application.SearchAll; +using Armory.Armament.Ammunition.Application.SearchAllByFlight; +using Armory.Armament.Equipments.Application.CheckExists; +using Armory.Armament.Equipments.Application.Create; +using Armory.Armament.Equipments.Application.Find; +using Armory.Armament.Equipments.Application.SearchAll; +using Armory.Armament.Equipments.Application.SearchAllByFlight; +using Armory.Armament.Equipments.Application.Update; +using Armory.Armament.Explosives.Application.CheckExists; +using Armory.Armament.Explosives.Application.Create; +using Armory.Armament.Explosives.Application.Find; +using Armory.Armament.Explosives.Application.SearchAll; +using Armory.Armament.Explosives.Application.SearchAllByFlight; +using Armory.Armament.Explosives.Application.Update; +using Armory.Armament.Weapons.Application.AssignHolder; +using Armory.Armament.Weapons.Application.CheckExists; +using Armory.Armament.Weapons.Application.Create; +using Armory.Armament.Weapons.Application.Find; +using Armory.Armament.Weapons.Application.GenerateQR; +using Armory.Armament.Weapons.Application.SearchAll; +using Armory.Armament.Weapons.Application.SearchAllByFlight; +using Armory.Armament.Weapons.Application.Update; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Armament +{ + public static class ArmamentApplication + { + public static IServiceCollection AddArmamentApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Degrees/DegreesApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Degrees/DegreesApplication.cs new file mode 100644 index 00000000..f66f1178 --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Degrees/DegreesApplication.cs @@ -0,0 +1,21 @@ +using Armory.Degrees.Application.Create; +using Armory.Degrees.Application.Find; +using Armory.Degrees.Application.SearchAll; +using Armory.Degrees.Application.SearchAllByRank; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Degrees +{ + public static class DegreesApplication + { + public static IServiceCollection AddDegreesApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/FireTeams/FireTeamsApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/FireTeams/FireTeamsApplication.cs new file mode 100644 index 00000000..b44f7515 --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/FireTeams/FireTeamsApplication.cs @@ -0,0 +1,25 @@ +using Armory.Fireteams.Application.CheckExists; +using Armory.Fireteams.Application.Create; +using Armory.Fireteams.Application.Find; +using Armory.Fireteams.Application.SearchAll; +using Armory.Fireteams.Application.SearchAllByFlight; +using Armory.Fireteams.Application.UpdateCommander; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.FireTeams +{ + public static class FireTeamApplication + { + public static IServiceCollection AddFireTeamsApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Flights/FlightsApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Flights/FlightsApplication.cs new file mode 100644 index 00000000..84197cb5 --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Flights/FlightsApplication.cs @@ -0,0 +1,23 @@ +using Armory.Flights.Application.CheckExists; +using Armory.Flights.Application.Create; +using Armory.Flights.Application.Find; +using Armory.Flights.Application.SearchAll; +using Armory.Flights.Application.UpdateCommander; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Flights +{ + public static class FlightsApplication + { + public static IServiceCollection AddFlightsApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Formats/FormatsApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Formats/FormatsApplication.cs new file mode 100644 index 00000000..1f2be26c --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Formats/FormatsApplication.cs @@ -0,0 +1,45 @@ +using Armory.Formats.AssignedWeaponMagazineFormats.Application.AddItem; +using Armory.Formats.AssignedWeaponMagazineFormats.Application.Create; +using Armory.Formats.AssignedWeaponMagazineFormats.Application.Find; +using Armory.Formats.AssignedWeaponMagazineFormats.Application.Generate; +using Armory.Formats.WarMaterialAndSpecialEquipmentAssignmentFormats.Application.Create; +using Armory.Formats.WarMaterialAndSpecialEquipmentAssignmentFormats.Application.Find; +using Armory.Formats.WarMaterialAndSpecialEquipmentAssignmentFormats.Application.Generate; +using Armory.Formats.WarMaterialDeliveryCertificateFormats.Application.Create; +using Armory.Formats.WarMaterialDeliveryCertificateFormats.Application.Find; +using Armory.Formats.WarMaterialDeliveryCertificateFormats.Application.Generate; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Formats +{ + public static class FormatsApplication + { + public static IServiceCollection AddFormatsApplication(this IServiceCollection services) + { + services + .AddScoped(); + services + .AddScoped(); + services + .AddScoped(); + + services + .AddScoped(); + services + .AddScoped(); + services + .AddScoped(); + + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/People/PeopleApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/People/PeopleApplication.cs new file mode 100644 index 00000000..f7bc8a9d --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/People/PeopleApplication.cs @@ -0,0 +1,33 @@ +using Armory.People.Application.CheckExists; +using Armory.People.Application.Create; +using Armory.People.Application.Delete; +using Armory.People.Application.Find; +using Armory.People.Application.SearchAll; +using Armory.People.Application.SearchAllByRank; +using Armory.People.Application.SearchAllByRole; +using Armory.People.Application.SearchByArmoryUserId; +using Armory.People.Application.Update; +using Armory.People.Application.UpdateDegree; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.People +{ + public static class PeopleApplication + { + public static IServiceCollection AddPeopleApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Ranks/RanksApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Ranks/RanksApplication.cs new file mode 100644 index 00000000..c014368e --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Ranks/RanksApplication.cs @@ -0,0 +1,19 @@ +using Armory.Ranks.Application.Create; +using Armory.Ranks.Application.Find; +using Armory.Ranks.Application.SearchAll; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Ranks +{ + public static class RanksApplication + { + public static IServiceCollection AddRanksApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Squads/SquadsApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Squads/SquadsApplication.cs new file mode 100644 index 00000000..93a9a837 --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Squads/SquadsApplication.cs @@ -0,0 +1,23 @@ +using Armory.Squads.Application.CheckExists; +using Armory.Squads.Application.Create; +using Armory.Squads.Application.Find; +using Armory.Squads.Application.SearchAll; +using Armory.Squads.Application.UpdateCommander; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Squads +{ + public static class SquadsApplication + { + public static IServiceCollection AddSquadsApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Troopers/TroopersApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Troopers/TroopersApplication.cs new file mode 100644 index 00000000..f0efd3ab --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Troopers/TroopersApplication.cs @@ -0,0 +1,27 @@ +using Armory.Troopers.Application.CheckExists; +using Armory.Troopers.Application.Create; +using Armory.Troopers.Application.Find; +using Armory.Troopers.Application.SearchAll; +using Armory.Troopers.Application.SearchAllByFireteam; +using Armory.Troopers.Application.Update; +using Armory.Troopers.Application.UpdateFireTeam; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Troopers +{ + public static class TroopersApplication + { + public static IServiceCollection AddTroopersApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +} diff --git a/src/Armory.Api/Extensions/DependencyInjection/Users/ArmoryUsersApplication.cs b/src/Armory.Api/Extensions/DependencyInjection/Users/ArmoryUsersApplication.cs new file mode 100644 index 00000000..c6938130 --- /dev/null +++ b/src/Armory.Api/Extensions/DependencyInjection/Users/ArmoryUsersApplication.cs @@ -0,0 +1,35 @@ +using Armory.Users.Application.AddToRole; +using Armory.Users.Application.Authenticate; +using Armory.Users.Application.ChangePassword; +using Armory.Users.Application.CheckExists; +using Armory.Users.Application.ConfirmEmail; +using Armory.Users.Application.Create; +using Armory.Users.Application.GenerateEmailConfirmationToken; +using Armory.Users.Application.GenerateJwt; +using Armory.Users.Application.GeneratePasswordResetToken; +using Armory.Users.Application.ResetPassword; +using Armory.Users.Application.SearchAllRoles; +using Microsoft.Extensions.DependencyInjection; + +namespace Armory.Api.Extensions.DependencyInjection.Users +{ + public static class ArmoryUsersApplication + { + public static IServiceCollection AddArmoryUsersApplication(this IServiceCollection services) + { + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + } +}