Tidied up using clauses

This commit is contained in:
Colin Dawson 2026-01-21 12:20:27 +00:00
parent 99133c1659
commit ae2f08d4ba
65 changed files with 7398 additions and 7459 deletions

View File

@ -1,6 +1,5 @@
using eSuite.API.Middleware;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using Moq;
using NUnit.Framework;

View File

@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Autofac;
using Autofac.Core.Lifetime;
namespace eSuite.API.Middleware;

View File

@ -1,5 +1,4 @@
using System;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace eSuite.Core.Miscellaneous;

View File

@ -2,7 +2,6 @@
using e_suite.Database.Audit.UnitTests.Helpers;
using e_suite.Database.Audit.UnitTests.Helpers.Tables;
using NUnit.Framework;
using NUnit.Framework.Constraints;
namespace e_suite.Database.Audit.UnitTests.AuditEngineCore;

View File

@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using e_suite.Database.Audit.Attributes;
using e_suite.Database.Audit.AuditEngine;
using e_suite.Database.Audit.Models;
namespace e_suite.Database.Audit.UnitTests.Helpers.Tables;

View File

@ -1,6 +1,4 @@
using System.Runtime.CompilerServices;
using System.Threading;
using e_suite.Database.Audit.AuditEngine;
using e_suite.Database.Audit.AuditEngine;
using e_suite.Database.Audit.Extensions;
using e_suite.Database.Audit.Tables.Audit;
using eSuite.Core.Clock;

View File

@ -4,7 +4,6 @@ using e_suite.API.Common;
using e_suite.MessageProcessor.Handlers;
using e_suite.Messaging.Common;
using e_suite.Messaging.Common.models;
using e_suite.Modules.UserManager;
using e_suite.Service.Sentinel;
using e_suite.UnitTestCore;
using Microsoft.Extensions.Logging;

View File

@ -4,7 +4,6 @@ using e_suite.API.Common;
using e_suite.MessageProcessor.Handlers;
using e_suite.Messaging.Common;
using e_suite.Messaging.Common.models;
using e_suite.Modules.UserManager;
using e_suite.Service.Sentinel;
using e_suite.UnitTestCore;
using Microsoft.Extensions.Logging;

View File

@ -10,7 +10,7 @@ using Microsoft.Extensions.Logging;
namespace e_suite.MessageProcessor.DependencyInjection;
/// <summary>
/// Used as a the primary location for IOC type registration for e-suite.
/// Used as the primary location for IOC type registration for e-suite.
/// </summary>
public class CoreRegistrationModule : Module
{

View File

@ -1,7 +1,6 @@
using e_suite.API.Common;
using RabbitMQ.Client.Events;
using e_suite.Messaging.Common.models;
using e_suite.Modules.UserManager;
using e_suite.Service.Sentinel;
using eSuite.Core.Clock;
using Microsoft.Extensions.Logging;

View File

@ -1,6 +1,4 @@
using System.Net;
using System.Text;
using e_suite.API.Common.extensions;
using e_suite.API.Common.extensions;
using e_suite.MessageProcessor.Handlers;
using RabbitMQ.Client.Events;
using RabbitMQ.Client;
@ -10,7 +8,6 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using e_suite.MessageProcessor.Extensions;
using e_suite.API.Common;
using System.Collections;
using Autofac;
namespace e_suite.MessageProcessor.QueueProcessor;

View File

@ -1,5 +1,4 @@
using e_suite.Database.Core.Tables.Forms;
using e_suite.Database.Core.Tables.Glossaries;
using e_suite.Database.Core.Tables.Glossaries;
namespace e_suite.Modules.CustomFieldManagerUnitTests.CustomFieldHelperUnitTests;

View File

@ -1,7 +1,6 @@
using e_suite.API.Common.exceptions;
using e_suite.API.Common.models;
using e_suite.Database.Audit;
using e_suite.Database.Core.Tables.Domain;
using e_suite.Database.Core.Tables.Glossaries;
using eSuite.Core.CustomFields;
using Sequence = e_suite.Database.Core.Tables.Sequences.Sequence;

View File

@ -1,6 +1,5 @@
using e_suite.API.Common.exceptions;
using e_suite.API.Common.models;
using e_suite.Database.Core.Tables.CustomFields;
using e_suite.Database.Core.Tables.Forms;
using e_suite.Database.Core.Tables.Glossaries;
using eSuite.Core.CustomFields;

View File

@ -1,9 +1,7 @@
using e_suite.API.Common.repository;
using e_suite.Database.Audit;
using e_suite.UnitTestCore;
using eSuite.Core.CustomFields;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.CustomFieldManagerUnitTests;

View File

@ -1,6 +1,5 @@
using e_suite.API.Common.exceptions;
using e_suite.API.Common.models;
using e_suite.API.Common.repository;
using e_suite.Database.Audit;
using e_suite.Database.Core.Tables.Domain;
using e_suite.Database.Core.Tables.UserManager;

View File

@ -3,7 +3,6 @@ using e_suite.Database.Audit;
using e_suite.Database.Core;
using e_suite.Database.Core.Extensions;
using e_suite.Database.Core.Tables.Domain;
using e_suite.Database.Core.Tables.UserManager;
using eSuite.Core.Miscellaneous;
using Microsoft.EntityFrameworkCore;

View File

@ -1,14 +1,11 @@
using e_suite.API.Common.models;
using e_suite.API.Common.repository;
using e_suite.API.Common.repository;
using e_suite.Database.Audit;
using e_suite.Database.Core;
using e_suite.Database.Core.Extensions;
using e_suite.Database.Core.Helpers;
using e_suite.Database.Core.Tables.CustomFields;
using e_suite.Database.Core.Tables.Forms;
using eSuite.Core.Miscellaneous;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace e_suite.Modules.FormsManager.Repository;

View File

@ -6,7 +6,6 @@ using e_suite.Database.Core.Tables.Forms;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.FormsManagerUnitTests;

View File

@ -1,9 +1,7 @@
using e_suite.API.Common.models;
using e_suite.Database.Audit;
using e_suite.Database.Audit.AuditEngine;
using e_suite.Database.Core.Extensions;
using e_suite.Database.Core.Tables.CustomFields;
using e_suite.Database.Core.Tables.Glossaries;
using eSuite.Core.Miscellaneous;
using GlossariesManager.UnitTests.Helpers;
using Moq;

View File

@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
using e_suite.API.Common.exceptions;
using e_suite.API.Common.exceptions;
using e_suite.API.Common.models;
using e_suite.Database.Audit;
using e_suite.Database.Core.Tables.Glossaries;

View File

@ -1,5 +1,4 @@
using Autofac.Features.Metadata;
using e_suite.API.Common.repository;
using e_suite.API.Common.repository;
using e_suite.Database.Audit;
using e_suite.Database.Audit.Models;
using e_suite.Database.Core.Extensions;
@ -10,8 +9,6 @@ using e_suite.UnitTestCore;
using eSuite.Core.CustomFields;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace GlossariesManager.UnitTests.Repository;

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Tables.Printer;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.OrganisationManager.UnitTests.Repository;

View File

@ -1,23 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("e-suite.Modules.PerformanceManager")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("e-suite.Modules.PerformanceManager")]
[assembly: System.Reflection.AssemblyTitleAttribute("e-suite.Modules.PerformanceManager")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("e-suite.Modules.PerformanceManager")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5aa0151c59e2666c508b96df9e92dabf83e500c9")]
[assembly: System.Reflection.AssemblyProductAttribute("e-suite.Modules.PerformanceManager")]
[assembly: System.Reflection.AssemblyTitleAttribute("e-suite.Modules.PerformanceManager")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -1 +1 @@
0f662bdafe7384dbd4340094b9eed6c2b3726486e827df695766cc0a48949cea
12c891daa1f4ee8300544eebbe3419c23cd5c84b39b050ea981c931e03259df0

View File

@ -1,17 +1,17 @@
is_global = true
build_property.TargetFramework = net10.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v10.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = e_suite.Modules.PerformanceManager
build_property.ProjectDir = C:\Users\me\OneDrive\Code\Sun\e-suite\e-suite.Modules.PerformanceManager\e-suite.Modules.PerformanceManager\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 10.0
build_property.EnableCodeStyleSeverity =
is_global = true
build_property.TargetFramework = net10.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v10.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = e_suite.Modules.PerformanceManager
build_property.ProjectDir = C:\Users\me\OneDrive\Code\Gitea\e-suite\e-suite.Backend\e-suite.Modules.PerformanceManager\e-suite.Modules.PerformanceManager\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 10.0
build_property.EnableCodeStyleSeverity =

View File

@ -1,26 +1,26 @@
{
"version": 2,
"dgSpecHash": "lr0GWqPTw4M=",
"success": true,
"projectFilePath": "C:\\Users\\me\\OneDrive\\Code\\Sun\\e-suite\\e-suite.Modules.PerformanceManager\\e-suite.Modules.PerformanceManager\\e-suite.Modules.PerformanceManager.csproj",
"expectedPackageFiles": [
"C:\\Users\\me\\.nuget\\packages\\autofac\\9.0.0\\autofac.9.0.0.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore\\10.0.2\\microsoft.entityframeworkcore.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\10.0.2\\microsoft.entityframeworkcore.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\10.0.2\\microsoft.entityframeworkcore.analyzers.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\10.0.2\\microsoft.extensions.caching.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.memory\\10.0.2\\microsoft.extensions.caching.memory.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration\\10.0.2\\microsoft.extensions.configuration.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\10.0.2\\microsoft.extensions.configuration.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.binder\\10.0.2\\microsoft.extensions.configuration.binder.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\10.0.2\\microsoft.extensions.dependencyinjection.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\10.0.2\\microsoft.extensions.dependencyinjection.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging\\10.0.2\\microsoft.extensions.logging.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\10.0.2\\microsoft.extensions.logging.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.options\\10.0.2\\microsoft.extensions.options.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.primitives\\10.0.2\\microsoft.extensions.primitives.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\newtonsoft.json\\13.0.4\\newtonsoft.json.13.0.4.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\system.linq.dynamic.core\\1.7.1\\system.linq.dynamic.core.1.7.1.nupkg.sha512"
],
"logs": []
{
"version": 2,
"dgSpecHash": "4f7E/BIy1ic=",
"success": true,
"projectFilePath": "C:\\Users\\me\\OneDrive\\Code\\Gitea\\e-suite\\e-suite.Backend\\e-suite.Modules.PerformanceManager\\e-suite.Modules.PerformanceManager\\e-suite.Modules.PerformanceManager.csproj",
"expectedPackageFiles": [
"C:\\Users\\me\\.nuget\\packages\\autofac\\9.0.0\\autofac.9.0.0.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore\\10.0.2\\microsoft.entityframeworkcore.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\10.0.2\\microsoft.entityframeworkcore.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\10.0.2\\microsoft.entityframeworkcore.analyzers.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\10.0.2\\microsoft.extensions.caching.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.memory\\10.0.2\\microsoft.extensions.caching.memory.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration\\10.0.2\\microsoft.extensions.configuration.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\10.0.2\\microsoft.extensions.configuration.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.binder\\10.0.2\\microsoft.extensions.configuration.binder.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\10.0.2\\microsoft.extensions.dependencyinjection.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\10.0.2\\microsoft.extensions.dependencyinjection.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging\\10.0.2\\microsoft.extensions.logging.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\10.0.2\\microsoft.extensions.logging.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.options\\10.0.2\\microsoft.extensions.options.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.primitives\\10.0.2\\microsoft.extensions.primitives.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\newtonsoft.json\\13.0.4\\newtonsoft.json.13.0.4.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\system.linq.dynamic.core\\1.7.1\\system.linq.dynamic.core.1.7.1.nupkg.sha512"
],
"logs": []
}

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Tables.UserManager;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace SSOManager.UnitTests.Helpers;

View File

@ -1,5 +1,4 @@
using e_suite.API.Common;
using e_suite.API.Common.repository;
using e_suite.Database.Audit;
using e_suite.UnitTestCore;

View File

@ -1,6 +1,5 @@
using e_suite.API.Common.exceptions;
using e_suite.Database.Core.Tables.UserManager;
using e_suite.Modules.SSOManager.repository;
using eSuite.Core.Miscellaneous;
using NUnit.Framework;
using SSOManager.UnitTests.Helpers;

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Extensions;
using eSuite.Core.Miscellaneous;
using e_suite.Database.Audit;
using MockQueryable;
using MockQueryable.Moq;
namespace SequenceManager.UnitTests.Repository;

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Tables.Printer;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.SiteManager.UnitTests.Helpers;

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Tables.Printer;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.SiteManager.UnitTests.Helpers;

View File

@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
using e_suite.API.Common.exceptions;
using e_suite.API.Common.exceptions;
using e_suite.Database.Core.Tables.CustomFields;
using e_suite.Database.Core.Tables.Forms;
using e_suite.Database.Core.Tables.Glossaries;

View File

@ -6,7 +6,6 @@ using e_suite.Database.Core.Tables.Forms;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.SpecificationManager.UnitTests.Helpers;

View File

@ -8,7 +8,6 @@ using e_suite.Database.Core.Tables.Glossaries;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.SpecificationManager.UnitTests.Helpers;

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Tables.Printer;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.SpecificationManager.UnitTests.Helpers;

View File

@ -5,7 +5,6 @@ using e_suite.Database.Core.Tables.Printer;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;
using MockQueryable.Moq;
namespace e_suite.Modules.SpecificationManager.UnitTests.Helpers;

View File

@ -1,7 +1,6 @@
using e_suite.API.Common.exceptions;
using e_suite.API.Common.models;
using e_suite.Database.Core.Tables.UserManager;
using eSuite.Core.MailService;
using eSuite.Core.Miscellaneous;
using Moq;
using NUnit.Framework;

View File

@ -20,7 +20,6 @@ using System.Text;
using System.Text.Json;
using e_suite.Modules.UserManager.Extensions;
using IUserManager = e_suite.API.Common.IUserManager;
using System.Threading;
using System.Data;
namespace e_suite.Modules.UserManager;

View File

@ -1,6 +1,5 @@
using e_suite.API.Common;
using e_suite.API.Common.repository;
using e_suite.Modules.UserManager.Repository;
namespace e_suite.Modules.UserManager;

View File

@ -12,7 +12,6 @@ using e_suite.Service.CustomFieldValidation;
using e_suite.UnitTestCore;
using eSuite.Core.CustomFields;
using eSuite.Core.Miscellaneous;
using Microsoft.EntityFrameworkCore;
using Moq;
using NUnit.Framework;

View File

@ -1,6 +1,4 @@
using System.Security.Cryptography.X509Certificates;
using Dapper;
using e_suite.Database.Core;
using e_suite.Database.Core;
using e_suite.Database.Core.Tables.Miscellaneous;
namespace e_suite.Service.EFlowSync.Repository;

View File

@ -1,6 +1,4 @@
using System.Threading;
namespace e_suite.Service.EFlowSync.Repository;
namespace e_suite.Service.EFlowSync.Repository;
public interface IEFlowSyncRepository
{

View File

@ -4,9 +4,7 @@ using e_suite.Database.Core.Tables.UserManager;
using eSuite.Core.MailService;
using Moq;
using NUnit.Framework;
using System.Net;
using System.Net.Mail;
using System.Threading;
using e_suite.Service.Mail.Facade;
namespace e_suite.Service.Mail.UnitTests.MailService;

View File

@ -1,6 +1,4 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Microsoft.AspNetCore.Mvc;
using NUnit.Framework;
using Sentinel.UnitTests.Helpers;

View File

@ -1,5 +1,4 @@
using System.Diagnostics;
using e_suite.API.Common.repository;
using e_suite.API.Common.repository;
using e_suite.Database.Core.Tables.Sentinel;
using eSuite.Core.Clock;
using Microsoft.AspNetCore.Mvc;

View File

@ -3,8 +3,6 @@ using e_suite.API.Common.exceptions;
using e_suite.API.Common.models;
using e_suite.Database.Audit;
using e_suite.Database.Core.Extensions;
using e_suite.Database.Core.Tables.Forms;
using e_suite.Database.Core.Tables.Printer;
using e_suite.Service.SigmaImporter.Extensions;
using e_suite.Service.SigmaImporter.Repository;
using e_suite.Utilities.Pagination;

View File

@ -9,7 +9,6 @@ using e_suite.API.Common.exceptions;
using e_suite.Service.SigmaImporter.Extensions;
using e_suite.API.Common.models;
using eSuite.Core.Clock;
using eSuite.Core.Miscellaneous;
namespace e_suite.Service.SigmaImporter.PrintSpecifications;

View File

@ -1,85 +1,85 @@
using Newtonsoft.Json;
namespace e_suite.Workflow.Core;
public interface ITask
{
/// <summary>
/// The guid identifying this task.
/// </summary>
Guid Guid { get; set; }
/// <summary>
/// ID of the parent of this task. It could be either a Task or a Workflow.
/// </summary>
ITask Parent { get; }
/// <summary>
/// Current state of the Task.
/// </summary>
TaskState TaskState { get; set; }
/// <summary>
/// Name of the task as seen by users, must be unique in the workflow.
/// </summary>
string Name { get; set; }
/// <summary>
/// Description of the task
/// </summary>
string Description { get; set; }
/// <summary>
/// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts)
/// </summary>
IList<ITask> Predecessors { get; }
/// <summary>
/// units of work involved in this item (UoW is a business term in this context)
/// </summary>
public decimal UnitsOfWork { get; set; }
/// <summary>
/// Cost of this work item
/// </summary>
public Cost Cost { get; set; }
/// <summary>
/// The option to show in budget.
/// </summary>
public BudgetOption BudgetOption { get; set; }
/// <summary>
/// Time tracking of this item
/// </summary>
public bool AllowTimeTracking { get; set; }
/// <summary>
/// Priority of this item
/// </summary>
public Priority Priority { get; set; }
/// <summary>
/// alloted duration of this item.
/// </summary>
public TimeSpan Duration { get; set; }
public IList<string> Tags { get; set; }
/// <summary>
/// Called when the task status has been progressed from Pending to Active.
///
/// Note: You can use this method to set the TaskStatus to ReadyToComplete if there is no manual processing needed for this task.
/// After this method is completed, the TaskStatus must be either Active or ReadyToComplete.
/// </summary>
/// <returns></returns>
Task OnActivateAsync();
/// <summary>
/// Called when the task status has been progressed from ReadyToComplete to Completed
/// </summary>
/// <returns>True when the task completes successfully, false when it is considered failed.</returns>
Task<bool> OnCompleteAsync();
//Todo add support for events (soap, rest, sftp, e-mail)
namespace e_suite.Workflow.Core;
public interface ITask
{
/// <summary>
/// The guid identifying this task.
/// </summary>
Guid Guid { get; set; }
/// <summary>
/// ID of the parent of this task. It could be either a Task or a Workflow.
/// </summary>
ITask Parent { get; }
//Todo move this out to runtime only.
/// <summary>
/// Current state of the Task.
/// </summary>
TaskState TaskState { get; set; }
/// <summary>
/// Name of the task as seen by users, must be unique in the workflow.
/// </summary>
string Name { get; set; }
/// <summary>
/// Description of the task
/// </summary>
string Description { get; set; }
/// <summary>
/// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts)
/// </summary>
IList<ITask> Predecessors { get; }
/// <summary>
/// units of work involved in this item (UoW is a business term in this context)
/// </summary>
public decimal UnitsOfWork { get; set; }
/// <summary>
/// Cost of this work item
/// </summary>
public Cost Cost { get; set; }
/// <summary>
/// The option to show in budget.
/// </summary>
public BudgetOption BudgetOption { get; set; }
/// <summary>
/// Time tracking of this item
/// </summary>
public bool AllowTimeTracking { get; set; }
/// <summary>
/// Priority of this item
/// </summary>
public Priority Priority { get; set; }
/// <summary>
/// alloted duration of this item.
/// </summary>
public TimeSpan Duration { get; set; }
public IList<string> Tags { get; set; }
/// <summary>
/// Called when the task status has been progressed from Pending to Active.
///
/// Note: You can use this method to set the TaskStatus to ReadyToComplete if there is no manual processing needed for this task.
/// After this method is completed, the TaskStatus must be either Active or ReadyToComplete.
/// </summary>
/// <returns></returns>
Task OnActivateAsync();
/// <summary>
/// Called when the task status has been progressed from ReadyToComplete to Completed
/// </summary>
/// <returns>True when the task completes successfully, false when it is considered failed.</returns>
Task<bool> OnCompleteAsync();
//Todo add support for events (soap, rest, sftp, e-mail)
}

View File

@ -1,45 +1,46 @@
using eSuite.Core.Miscellaneous;
namespace e_suite.Workflow.Core;
public interface IWorkflow : IStage<GeneralTaskAttribute>
{
/// <summary>
/// Client domain to which the workflow belongs.
/// </summary>
IGeneralIdRef Domain { get; set; }
/// <summary>
/// Current state of the workflow, see WorkflowState for details of the various states.
/// </summary>
[RuntimeOnly]
WorkflowState CurrentState { get; set; }
string ActivityNameTemplate { get; set; }
/// <summary>
/// Description of the workflow
/// </summary>
string Description { get; set; }
/// <summary>
/// If the workflow has been paused, will be true.
/// </summary>
bool Paused { get; }
/// <summary>
/// Called when the task status has been progressed from Pending to Active.
///
/// Note: You can use this method to set the TaskStatus to ReadyToComplete if there is no manual processing needed for this task.
/// After this method is completed, the TaskStatus must be either Active or ReadyToComplete.
/// </summary>
/// <returns></returns>
Task OnActivateAsync();
/// <summary>
/// Called when the task status has been progressed from ReadyToComplete to Completed
/// When this method is completed the state must be either Active, or Completed.
/// </summary>
/// <returns></returns>
Task OnCompleteAsync();
using eSuite.Core.Miscellaneous;
namespace e_suite.Workflow.Core;
public interface IWorkflow : IStage<GeneralTaskAttribute>
{
/// <summary>
/// Client domain to which the workflow belongs.
/// </summary>
IGeneralIdRef Domain { get; set; }
//todo Move this out to runtime only.
/// <summary>
/// Current state of the workflow, see WorkflowState for details of the various states.
/// </summary>
[RuntimeOnly]
WorkflowState CurrentState { get; set; }
string ActivityNameTemplate { get; set; }
/// <summary>
/// Description of the workflow
/// </summary>
string Description { get; set; }
/// <summary>
/// If the workflow has been paused, will be true.
/// </summary>
bool Paused { get; }
/// <summary>
/// Called when the task status has been progressed from Pending to Active.
///
/// Note: You can use this method to set the TaskStatus to ReadyToComplete if there is no manual processing needed for this task.
/// After this method is completed, the TaskStatus must be either Active or ReadyToComplete.
/// </summary>
/// <returns></returns>
Task OnActivateAsync();
/// <summary>
/// Called when the task status has been progressed from ReadyToComplete to Completed
/// When this method is completed the state must be either Active, or Completed.
/// </summary>
/// <returns></returns>
Task OnCompleteAsync();
}

View File

@ -1,30 +1,28 @@
using eSuite.Core.Miscellaneous;
namespace e_suite.Workflow.Core;
public abstract class TaskBase : ITask
{
public Guid Guid { get; set; } = Guid.CreateVersion7();
public required ITask Parent { get; set; }
public TaskState TaskState { get; set; } = TaskState.Pending;
public required string Name { get; set; }
public string Description { get; set; } = string.Empty;
public IList<ITask> Predecessors { get; set; } = new List<ITask>();
public decimal UnitsOfWork { get; set; } = 1;
public required Cost Cost { get; set; }
public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow;
public bool AllowTimeTracking { get; set; } = true;
public Priority Priority { get; set; } = Priority.Normal;
public required TimeSpan Duration { get; set; }
public IList<string> Tags { get; set; } = new List<string>();
public virtual Task OnActivateAsync()
{
return Task.CompletedTask;
}
public virtual Task<bool> OnCompleteAsync()
{
return Task.FromResult(true);
}
namespace e_suite.Workflow.Core;
public abstract class TaskBase : ITask
{
public Guid Guid { get; set; } = Guid.CreateVersion7();
public required ITask Parent { get; set; }
public TaskState TaskState { get; set; } = TaskState.Pending;
public required string Name { get; set; }
public string Description { get; set; } = string.Empty;
public IList<ITask> Predecessors { get; set; } = new List<ITask>();
public decimal UnitsOfWork { get; set; } = 1;
public required Cost Cost { get; set; }
public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow;
public bool AllowTimeTracking { get; set; } = true;
public Priority Priority { get; set; } = Priority.Normal;
public required TimeSpan Duration { get; set; }
public IList<string> Tags { get; set; } = new List<string>();
public virtual Task OnActivateAsync()
{
return Task.CompletedTask;
}
public virtual Task<bool> OnCompleteAsync()
{
return Task.FromResult(true);
}
}

View File

@ -1,11 +1,9 @@
using System.ComponentModel.DataAnnotations;
namespace e_suite.Workflow.Core;
[GeneralTask]
public class AdhocApprovalTask : TaskBase, IAssignees<IApprovalTaskAssignee>, IFailedLoopback
{
public required Task Loopback { get; set; }
public IList<IApprovalTaskAssignee> Assignees { get; } = new List<IApprovalTaskAssignee>();
namespace e_suite.Workflow.Core;
[GeneralTask]
public class AdhocApprovalTask : TaskBase, IAssignees<IApprovalTaskAssignee>, IFailedLoopback
{
public required Task Loopback { get; set; }
public IList<IApprovalTaskAssignee> Assignees { get; } = new List<IApprovalTaskAssignee>();
}

View File

@ -1,23 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("e-suite.Workflow.Core")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("e-suite.Workflow.Core")]
[assembly: System.Reflection.AssemblyTitleAttribute("e-suite.Workflow.Core")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("e-suite.Workflow.Core")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5aa0151c59e2666c508b96df9e92dabf83e500c9")]
[assembly: System.Reflection.AssemblyProductAttribute("e-suite.Workflow.Core")]
[assembly: System.Reflection.AssemblyTitleAttribute("e-suite.Workflow.Core")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -1 +1 @@
d7622d2253f7527686bfc36d02ecc0582002634e2b8f181b427834bed3363de9
401d80c848c6581f40e8a691ecc83524e9c984106b2aac0cef841233e271a764

View File

@ -1,17 +1,17 @@
is_global = true
build_property.TargetFramework = net10.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v10.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = e_suite.Workflow.Core
build_property.ProjectDir = C:\Users\me\OneDrive\Code\Sun\e-suite\e-suite.Workflow.Core\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 10.0
build_property.EnableCodeStyleSeverity =
is_global = true
build_property.TargetFramework = net10.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v10.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = e_suite.Workflow.Core
build_property.ProjectDir = C:\Users\me\OneDrive\Code\Gitea\e-suite\e-suite.Backend\e-suite.Workflow.Core\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 10.0
build_property.EnableCodeStyleSeverity =

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,25 @@
{
"version": 2,
"dgSpecHash": "im90Df47BEc=",
"success": true,
"projectFilePath": "C:\\Users\\me\\OneDrive\\Code\\Sun\\e-suite\\e-suite.Workflow.Core\\e-suite.Workflow.Core.csproj",
"expectedPackageFiles": [
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore\\10.0.2\\microsoft.entityframeworkcore.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\10.0.2\\microsoft.entityframeworkcore.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\10.0.2\\microsoft.entityframeworkcore.analyzers.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\10.0.2\\microsoft.extensions.caching.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.memory\\10.0.2\\microsoft.extensions.caching.memory.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration\\10.0.2\\microsoft.extensions.configuration.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\10.0.2\\microsoft.extensions.configuration.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.binder\\10.0.2\\microsoft.extensions.configuration.binder.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\10.0.2\\microsoft.extensions.dependencyinjection.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\10.0.2\\microsoft.extensions.dependencyinjection.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging\\10.0.2\\microsoft.extensions.logging.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\10.0.2\\microsoft.extensions.logging.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.options\\10.0.2\\microsoft.extensions.options.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.primitives\\10.0.2\\microsoft.extensions.primitives.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\newtonsoft.json\\13.0.4\\newtonsoft.json.13.0.4.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\system.linq.dynamic.core\\1.7.1\\system.linq.dynamic.core.1.7.1.nupkg.sha512"
],
"logs": []
{
"version": 2,
"dgSpecHash": "lPCP7DAF+Go=",
"success": true,
"projectFilePath": "C:\\Users\\me\\OneDrive\\Code\\Gitea\\e-suite\\e-suite.Backend\\e-suite.Workflow.Core\\e-suite.Workflow.Core.csproj",
"expectedPackageFiles": [
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore\\10.0.2\\microsoft.entityframeworkcore.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\10.0.2\\microsoft.entityframeworkcore.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\10.0.2\\microsoft.entityframeworkcore.analyzers.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\10.0.2\\microsoft.extensions.caching.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.caching.memory\\10.0.2\\microsoft.extensions.caching.memory.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration\\10.0.2\\microsoft.extensions.configuration.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\10.0.2\\microsoft.extensions.configuration.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.configuration.binder\\10.0.2\\microsoft.extensions.configuration.binder.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\10.0.2\\microsoft.extensions.dependencyinjection.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\10.0.2\\microsoft.extensions.dependencyinjection.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging\\10.0.2\\microsoft.extensions.logging.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\10.0.2\\microsoft.extensions.logging.abstractions.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.options\\10.0.2\\microsoft.extensions.options.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\microsoft.extensions.primitives\\10.0.2\\microsoft.extensions.primitives.10.0.2.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\newtonsoft.json\\13.0.4\\newtonsoft.json.13.0.4.nupkg.sha512",
"C:\\Users\\me\\.nuget\\packages\\system.linq.dynamic.core\\1.7.1\\system.linq.dynamic.core.1.7.1.nupkg.sha512"
],
"logs": []
}