diff --git a/.vs/DigitalData.Core/DesignTimeBuild/.dtbcache.v2 b/.vs/DigitalData.Core/DesignTimeBuild/.dtbcache.v2 index 9a3fd86..f27f39b 100644 Binary files a/.vs/DigitalData.Core/DesignTimeBuild/.dtbcache.v2 and b/.vs/DigitalData.Core/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/DigitalData.Core/v17/.futdcache.v2 b/.vs/DigitalData.Core/v17/.futdcache.v2 index 4572b71..6c71737 100644 Binary files a/.vs/DigitalData.Core/v17/.futdcache.v2 and b/.vs/DigitalData.Core/v17/.futdcache.v2 differ diff --git a/.vs/DigitalData.Core/v17/.suo b/.vs/DigitalData.Core/v17/.suo index 53dc880..a1ef259 100644 Binary files a/.vs/DigitalData.Core/v17/.suo and b/.vs/DigitalData.Core/v17/.suo differ diff --git a/.vs/ProjectEvaluation/digitaldata.core.metadata.v6.1 b/.vs/ProjectEvaluation/digitaldata.core.metadata.v6.1 index 71fd50e..9265a88 100644 Binary files a/.vs/ProjectEvaluation/digitaldata.core.metadata.v6.1 and b/.vs/ProjectEvaluation/digitaldata.core.metadata.v6.1 differ diff --git a/.vs/ProjectEvaluation/digitaldata.core.projects.v6.1 b/.vs/ProjectEvaluation/digitaldata.core.projects.v6.1 index 109d791..51932b4 100644 Binary files a/.vs/ProjectEvaluation/digitaldata.core.projects.v6.1 and b/.vs/ProjectEvaluation/digitaldata.core.projects.v6.1 differ diff --git a/DigitalData.Core.Application/ResponseService.cs b/DigitalData.Core.Application/ResponseService.cs index 67e5249..e22b570 100644 --- a/DigitalData.Core.Application/ResponseService.cs +++ b/DigitalData.Core.Application/ResponseService.cs @@ -1,4 +1,5 @@ using DigitalData.Core.Contracts.Application; +using static System.Runtime.InteropServices.JavaScript.JSType; namespace DigitalData.Core.Application { @@ -7,16 +8,64 @@ namespace DigitalData.Core.Application /// public class ResponseService : IResponseService { + + #region WITHOUT_MESSAGE + + /// + /// Creates a service message indicating success or failure without additional messages. + /// + /// Indicates if the operation was successful. + /// A service message reflecting the operation outcome. + public IServiceMessage CreateMessage(bool isSuccess) => new ServiceMessage(isSuccess); + + /// + /// Creates a service result containing the provided data and a success flag, without additional messages. + /// + /// The type of the data included in the result. + /// The data to include in the result. + /// Indicates if the operation was successful. + /// A service result with the specified data and outcome. + public IServiceResult CreateResult(T? data, bool isSuccess) => new ServiceResult(data, isSuccess); + + /// + /// Creates a service message indicating a successful operation without additional messages. + /// + /// A service message indicating a successful operation. + public IServiceMessage Successful() => CreateMessage(true); + + /// + /// Creates a service message indicating a failed operation without additional messages. + /// + /// A service message indicating a failed operation. + public IServiceMessage Failed() => CreateMessage(false); + + /// + /// Creates a successful service result with the specified data, without additional messages. + /// + /// The type of data included in the result. + /// The data to include in the result. + /// A successful service result containing the specified data. + public IServiceResult Successful(T data) => CreateResult(data, true); + + /// + /// Creates a failed service result with optional data, without additional messages. + /// + /// The type of data the service result can contain. + /// Optional data to include in the result. + /// A failed service result, which may or may not contain the specified data. + public IServiceResult Failed(T? data = default) => CreateResult(data, false); + + #endregion + + #region WITH_STRING_MESSAGE + /// /// Creates a service message with the specified success flag and messages. /// /// Indicates if the operation was successful. /// An array of messages associated with the operation. /// A new instance of reflecting the operation outcome. - public virtual IServiceMessage CreateMessage(bool isSuccess, params string[] messages) - { - return new ServiceMessage(isSuccess, messages); - } + public virtual IServiceMessage CreateMessage(bool isSuccess, params string[] messages) => new ServiceMessage(isSuccess, messages); /// /// Creates a service result containing the provided data, success flag, and messages. @@ -26,10 +75,7 @@ namespace DigitalData.Core.Application /// Indicates if the operation was successful. /// An array of messages associated with the operation. /// A new instance of with the specified data and outcome. - public virtual IServiceResult CreateResult(T? data = default, bool isSuccess = true, params string[] messages) - { - return new ServiceResult(data, isSuccess, messages); - } + public virtual IServiceResult CreateResult(T? data = default, bool isSuccess = true, params string[] messages) => new ServiceResult(data, isSuccess, messages); /// /// Creates a successful service message. @@ -76,6 +122,9 @@ namespace DigitalData.Core.Application /// and it will include the provided failure messages. public virtual IServiceResult Failed(params string[] messages) => Failed(default, messages); + #endregion + #region WITH_ENUM_MESSAGE + /// /// Creates a service message with the specified success flag and enumeration messages. /// @@ -134,5 +183,7 @@ namespace DigitalData.Core.Application /// A failed service result. The data part of the result will be set to the default value for the specified type, /// and it will include the provided failure messages. public IServiceResult Failed(params Enum[] messages) => Failed(default(T), messages); + + #endregion } } \ No newline at end of file diff --git a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.dll b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.dll index 0df5aa0..78916dc 100644 Binary files a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.dll and b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.dll differ diff --git a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.pdb b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.pdb index 5ff5f36..50443aa 100644 Binary files a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.pdb and b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Application.pdb differ diff --git a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.dll b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.dll index 210baa0..9c30b51 100644 Binary files a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.dll and b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb index d99df57..1c7b29a 100644 Binary files a/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb and b/DigitalData.Core.Application/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb differ diff --git a/DigitalData.Core.Application/bin/Debug/net7.0/icon.png b/DigitalData.Core.Application/bin/Debug/net7.0/icon.png deleted file mode 100644 index 9c67cca..0000000 Binary files a/DigitalData.Core.Application/bin/Debug/net7.0/icon.png and /dev/null differ diff --git a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.AssemblyReference.cache b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.AssemblyReference.cache index bdf8992..c3e677f 100644 Binary files a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.AssemblyReference.cache and b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.AssemblyReference.cache differ diff --git a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.FileListAbsolute.txt b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.FileListAbsolute.txt index d09c64a..51fc073 100644 --- a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.FileListAbsolute.txt +++ b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.csproj.FileListAbsolute.txt @@ -45,7 +45,6 @@ E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Application\obj\Debu E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Application\obj\Debug\net7.0\refint\DigitalData.Core.Application.dll E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Application\obj\Debug\net7.0\DigitalData.Core.Application.pdb E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Application\obj\Debug\net7.0\ref\DigitalData.Core.Application.dll -E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\icon.png E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\DigitalData.Core.Application.deps.json E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\DigitalData.Core.Application.dll E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Application\bin\Debug\net7.0\DigitalData.Core.Application.pdb diff --git a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.dll b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.dll index 0df5aa0..78916dc 100644 Binary files a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.dll and b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.dll differ diff --git a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.pdb b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.pdb index 5ff5f36..50443aa 100644 Binary files a/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.pdb and b/DigitalData.Core.Application/obj/Debug/net7.0/DigitalData.Core.Application.pdb differ diff --git a/DigitalData.Core.Application/obj/Debug/net7.0/ref/DigitalData.Core.Application.dll b/DigitalData.Core.Application/obj/Debug/net7.0/ref/DigitalData.Core.Application.dll index f73904e..82887dd 100644 Binary files a/DigitalData.Core.Application/obj/Debug/net7.0/ref/DigitalData.Core.Application.dll and b/DigitalData.Core.Application/obj/Debug/net7.0/ref/DigitalData.Core.Application.dll differ diff --git a/DigitalData.Core.Application/obj/Debug/net7.0/refint/DigitalData.Core.Application.dll b/DigitalData.Core.Application/obj/Debug/net7.0/refint/DigitalData.Core.Application.dll index f73904e..82887dd 100644 Binary files a/DigitalData.Core.Application/obj/Debug/net7.0/refint/DigitalData.Core.Application.dll and b/DigitalData.Core.Application/obj/Debug/net7.0/refint/DigitalData.Core.Application.dll differ diff --git a/DigitalData.Core.Contracts/Application/IResponseService.cs b/DigitalData.Core.Contracts/Application/IResponseService.cs index 90c90a6..d55f994 100644 --- a/DigitalData.Core.Contracts/Application/IResponseService.cs +++ b/DigitalData.Core.Contracts/Application/IResponseService.cs @@ -5,6 +5,55 @@ /// public interface IResponseService { + #region WITHOUT_MESSAGE + + /// + /// Creates a simple service message indicating success or failure without any additional messages. + /// + /// Indicates if the operation was successful. + /// A service message indicating the outcome of the operation without any messages. + IServiceMessage CreateMessage(bool isSuccess); + + /// + /// Creates a service result with the specified data and a success flag, without any additional messages. + /// + /// The type of data the service result will contain. + /// The data for the service result. + /// Indicates if the operation was successful. + /// A service result containing the data and indicating the outcome of the operation without any messages. + IServiceResult CreateResult(T? data, bool isSuccess); + + /// + /// Creates a service message indicating a successful operation without any messages. + /// + /// A service message indicating a successful operation. + IServiceMessage Successful(); + + /// + /// Creates a service message indicating a failed operation without any messages. + /// + /// A service message indicating a failed operation. + IServiceMessage Failed(); + + /// + /// Creates a successful service result with the specified data, without any messages. + /// + /// The type of data the service result will contain. + /// The data to include in the service result. + /// A successful service result containing the data, indicating a successful operation without any messages. + IServiceResult Successful(T data); + + /// + /// Creates a failed service result, optionally including data, without any messages. + /// + /// The type of data the service result can contain. + /// Optional data to include in the failed service result. + /// A failed service result, which may or may not contain data, indicating a failed operation without any messages. + IServiceResult Failed(T? data = default); + + #endregion + #region WITH_STRING_MESSAGE + /// /// Creates a service message. /// @@ -67,6 +116,9 @@ /// A failed service result. The data part of the result will be set to the default value for the specified type. IServiceResult Failed(params string[] messages); + #endregion + #region WITH_ENUM_MESSAGE + /// /// Creates a service message using enumeration values. /// @@ -128,5 +180,6 @@ /// An array of enumeration values associated with the operation. These provide detail about why the operation failed. /// A failed service result. The data part of the result will be set to the default value for the specified type. IServiceResult Failed(params Enum[] messages); + #endregion } } \ No newline at end of file diff --git a/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.dll b/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.dll index 573b6b0..9c30b51 100644 Binary files a/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.dll and b/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb b/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb index 8dceca0..1c7b29a 100644 Binary files a/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb and b/DigitalData.Core.Contracts/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb differ diff --git a/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.dll b/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.dll index 573b6b0..9c30b51 100644 Binary files a/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.dll and b/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.pdb b/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.pdb index 8dceca0..1c7b29a 100644 Binary files a/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.pdb and b/DigitalData.Core.Contracts/obj/Debug/net7.0/DigitalData.Core.Contracts.pdb differ diff --git a/DigitalData.Core.Contracts/obj/Debug/net7.0/ref/DigitalData.Core.Contracts.dll b/DigitalData.Core.Contracts/obj/Debug/net7.0/ref/DigitalData.Core.Contracts.dll index 2b76049..cc1d723 100644 Binary files a/DigitalData.Core.Contracts/obj/Debug/net7.0/ref/DigitalData.Core.Contracts.dll and b/DigitalData.Core.Contracts/obj/Debug/net7.0/ref/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.Contracts/obj/Debug/net7.0/refint/DigitalData.Core.Contracts.dll b/DigitalData.Core.Contracts/obj/Debug/net7.0/refint/DigitalData.Core.Contracts.dll index 2b76049..cc1d723 100644 Binary files a/DigitalData.Core.Contracts/obj/Debug/net7.0/refint/DigitalData.Core.Contracts.dll and b/DigitalData.Core.Contracts/obj/Debug/net7.0/refint/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.dll b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.dll index 573b6b0..9c30b51 100644 Binary files a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.dll and b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb index 8dceca0..1c7b29a 100644 Binary files a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb and b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb differ diff --git a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.dll b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.dll index a5d3c0a..e5d8377 100644 Binary files a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.dll and b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.dll differ diff --git a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.pdb b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.pdb index 6ec285e..08876e3 100644 Binary files a/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.pdb and b/DigitalData.Core.CultureServices/bin/Debug/net7.0/DigitalData.Core.CultureServices.pdb differ diff --git a/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.csproj.AssemblyReference.cache b/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.csproj.AssemblyReference.cache index 3f69290..b9f4d3d 100644 Binary files a/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.csproj.AssemblyReference.cache and b/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.csproj.AssemblyReference.cache differ diff --git a/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.dll b/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.dll index a5d3c0a..e5d8377 100644 Binary files a/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.dll and b/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.dll differ diff --git a/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.pdb b/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.pdb index 6ec285e..08876e3 100644 Binary files a/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.pdb and b/DigitalData.Core.CultureServices/obj/Debug/net7.0/DigitalData.Core.CultureServices.pdb differ diff --git a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.dll b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.dll index 573b6b0..9c30b51 100644 Binary files a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.dll and b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.dll differ diff --git a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb index 8dceca0..1c7b29a 100644 Binary files a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb and b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Contracts.pdb differ diff --git a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.dll b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.dll index 5057bbb..7e103c9 100644 Binary files a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.dll and b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.dll differ diff --git a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.pdb b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.pdb index df54378..c99b3e4 100644 Binary files a/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.pdb and b/DigitalData.Core.Infrastructure/bin/Debug/net7.0/DigitalData.Core.Infrastructure.pdb differ diff --git a/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.csproj.AssemblyReference.cache b/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.csproj.AssemblyReference.cache index 0f1fc9d..3829cb8 100644 Binary files a/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.csproj.AssemblyReference.cache and b/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.csproj.AssemblyReference.cache differ diff --git a/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.dll b/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.dll index 5057bbb..7e103c9 100644 Binary files a/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.dll and b/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.dll differ diff --git a/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.pdb b/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.pdb index df54378..c99b3e4 100644 Binary files a/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.pdb and b/DigitalData.Core.Infrastructure/obj/Debug/net7.0/DigitalData.Core.Infrastructure.pdb differ