Refactor code structure for improved readability and maintainability

This commit is contained in:
Torsten Brendgen
2026-07-07 23:27:57 +02:00
parent 96a3e98109
commit bbe521b38d
1632 changed files with 27313 additions and 54917 deletions
-7
View File
@@ -1,7 +0,0 @@
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IAbstractInterface
{
bool SaveChanges();
}
}
+22
View File
@@ -0,0 +1,22 @@
using Microsoft.SelfService.Portal.Core.API.Models;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IDeploymentBatchInterface
{
ICollection<DeploymentGroupModel> GetDeploymentBatches();
DeploymentGroupModel? GetDeploymentBatchById(Guid id);
bool AddDeploymentBatchById(DeploymentGroupModel deploymentBatch, ICollection<Guid>? targetIds);
bool DeleteDeploymentBatchById(DeploymentGroupModel deploymentBatch);
bool EditDeploymentBatchById(DeploymentGroupModel deploymentBatch);
bool CheckDeploymentBatchById(Guid id);
bool SaveChanges();
}
}
-18
View File
@@ -1,18 +0,0 @@
using Microsoft.SelfService.Portal.Core.API.Models;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IDeploymentGroupInterface
{
ICollection<DeploymentGroupModel> GetDeploymentGroups();
DeploymentGroupModel GetDeploymentGroupById(Guid Id);
bool AddDeploymentGroupById(DeploymentGroupModel deploymentgroup, ICollection<Guid>? virtualMachineIds);
bool DeleteDeploymentGroupById(DeploymentGroupModel deploymentgroup);
bool EditDeploymentGroupById(DeploymentGroupModel deploymentgroup);
bool CheckDeploymentGroupById(Guid Id);
bool SaveChanges();
}
}
+3
View File
@@ -10,8 +10,11 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
bool AddDeploymentById(DeploymentModel deployment);
bool DeleteDeploymentById(DeploymentModel deployment);
bool EditDeploymentById(DeploymentModel deployment);
DeploymentModel GetDeploymentByCompositeId(Guid deploymentGroupId, Guid targetId);
bool CheckDeploymentByCompositeId(Guid deploymentGroupId, Guid targetId);
bool CheckDeploymentById(Guid Id);
bool SaveChanges();
}
}
+2 -1
View File
@@ -12,7 +12,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
bool EditDomainById(DomainModel domain);
DomainModel GetDomainByIdInEnvironments(Guid Id);
DomainModel GetVirtualMachinesByDomainId(Guid Id);
DomainModel GetTargetsByDomainId(Guid Id);
bool LinkDomainByIdToEnvironment(EnvironmentDomainsModel environmentDomain);
bool UnlinkDomainByIdFromEnvironment(EnvironmentDomainsModel environmentDomain);
@@ -23,3 +23,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
bool SaveChanges();
}
}
+1
View File
@@ -20,3 +20,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
bool SaveChanges();
}
}
-16
View File
@@ -1,16 +0,0 @@
using Microsoft.SelfService.Portal.Core.API.Models;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IJobInterface : IAbstractInterface
{
ICollection<JobModel> GetJobs();
JobModel GetJobById(Guid Id);
bool CreateJobById(JobModel job);
bool UpdateJobById(JobModel job);
bool DeleteJobById(JobModel job);
bool CheckJobById(Guid Id);
}
}
+3 -2
View File
@@ -1,11 +1,12 @@
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IQueueJobService
{
Guid EnqueueTemplateJsonChanged(Guid templateId, string oldJsonData, string newJsonData);
Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection<Guid> virtualMachineIds, string jsonData);
Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection<Guid> targetIds, string jsonData);
bool RetryQueueJob(Guid queueJobId);
bool ApproveQueueJobStep(Guid queueJobStepId, string approvedBy, string? comment);
bool RejectQueueJobStep(Guid queueJobStepId, string approvedBy, string? comment);
}
}
-18
View File
@@ -1,18 +0,0 @@
using Microsoft.SelfService.Portal.Core.API.Models;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IRunbookInterface
{
ICollection<RunbookModel> GetRunbooks();
RunbookModel GetRunbookById(Guid Id);
bool AddRunbookById(RunbookModel runbook);
bool EditRunbookById(RunbookModel runbook);
bool CheckRunbookById(Guid Id);
bool CheckRunbookByName(string Name);
bool SaveChanges();
}
}
+1
View File
@@ -28,3 +28,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
}
}
+21
View File
@@ -0,0 +1,21 @@
using Microsoft.SelfService.Portal.Core.API.Models;
using System.Diagnostics.Eventing.Reader;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface ITargetInterface
{
ICollection<TargetModel> GetTargets();
bool AddTargetById(TargetModel target);
bool EditTargetById(TargetModel target);
bool DeleteTargetById(TargetModel target);
TargetModel GetTargetById(Guid Id);
TargetModel GetTargetByName(string Name);
bool CheckTargetById(Guid Id);
bool CheckTargetByName(String Name);
bool SaveChanges();
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
using Microsoft.SelfService.Portal.Core.API.Models;
using Microsoft.SelfService.Portal.Core.API.Models;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
@@ -18,3 +18,4 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
bool SaveChanges();
}
}
+8
View File
@@ -15,6 +15,14 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces
bool CheckTemplateById(Guid Id);
TemplateModel GetTemplateByName(string Name);
bool CheckTemplateByName(string Name);
ICollection<TemplateVersionModel> GetTemplateVersions(Guid templateId);
TemplateVersionModel? GetTemplateVersionById(Guid templateId, Guid versionId);
TemplateVersionModel? GetPublishedTemplateVersion(Guid templateId);
bool AddTemplateVersion(Guid templateId, TemplateVersionModel version, bool publish);
bool PublishTemplateVersion(Guid templateId, Guid versionId, string? publishedBy);
bool CheckTemplateVersionById(Guid templateId, Guid versionId);
bool CheckTemplateVersionByVersion(Guid templateId, string version);
bool SaveChanges();
}
}
-20
View File
@@ -1,20 +0,0 @@
using Microsoft.SelfService.Portal.Core.API.Models;
using System.Diagnostics.Eventing.Reader;
namespace Microsoft.SelfService.Portal.Core.API.Interfaces
{
public interface IVirtualMachineInterface
{
ICollection<VirtualMachineModel> GetVirtualMachines();
bool AddVirtualMachineById(VirtualMachineModel virtualMachine);
bool EditVirtualMachineById(VirtualMachineModel virtualMachine);
bool DeleteVirtualMachineById(VirtualMachineModel virtualMachine);
VirtualMachineModel GetVirtualMachineById(Guid Id);
VirtualMachineModel GetVirtualMachineByName(string Name);
bool CheckVirtualMachineById(Guid Id);
bool CheckVirtualMachineByName(String Name);
bool SaveChanges();
}
}