Compare commits
2 Commits
993d407a48
...
a01e6e5b16
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a01e6e5b16 | ||
|
|
96d03a5f59 |
@@ -8,7 +8,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<Description>This package provides a comprehensive set of API controllers and related utilities for the DigitalData.Core library. It includes generic CRUD controllers, localization extensions, middleware for security policies, and application model conventions.</Description>
|
||||
<PackageId>DigitalData.Core.API</PackageId>
|
||||
<Version>1.0.2.1</Version>
|
||||
<Version>2.0.0.0</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>DigitalData.Core.API</Product>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
@@ -18,7 +18,7 @@
|
||||
<PackAsTool>False</PackAsTool>
|
||||
<NeutralLanguage>aa-DJ</NeutralLanguage>
|
||||
<PackageIcon>Assets\icon.png</PackageIcon>
|
||||
<Version>1.0.1.1</Version>
|
||||
<Version>2.0.0.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<RepositoryUrl>http://git.dd:3000/AppStd/WebCoreModules.git</RepositoryUrl>
|
||||
<PackageTags>digital data core application clean architecture</PackageTags>
|
||||
<Version>2.0.0.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -147,6 +147,35 @@ namespace DigitalData.Core.DTO
|
||||
/// <returns>True if any notice has any of the specified flags; otherwise, false.</returns>
|
||||
public static bool HasAnyFlag(this IEnumerable<Notice> notices, params Enum[] flags) => flags.Any(f => notices.HasFlag(f));
|
||||
|
||||
/// <summary>
|
||||
/// Executes a function based on the success or failure of the task result,
|
||||
/// without using result data.
|
||||
/// </summary>
|
||||
/// <typeparam name="I">The type of the return value.</typeparam>
|
||||
/// <param name="tResult">The task returning a result to evaluate.</param>
|
||||
/// <param name="Success">The function to execute if the result is successful.</param>
|
||||
/// <param name="Fail">The function to execute if the result is a failure.</param>
|
||||
/// <returns>The result of the executed function.</returns>
|
||||
public static I? Then<I>(this Result result, Func<I> Success)
|
||||
{
|
||||
return result.IsSuccess ? Success() : default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a function based on the success or failure of the task result,
|
||||
/// using the data in the result.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data in the result.</typeparam>
|
||||
/// <typeparam name="I">The type of the return value.</typeparam>
|
||||
/// <param name="tResult">The task returning a data result to evaluate.</param>
|
||||
/// <param name="Success">The function to execute if the data result is successful.</param>
|
||||
/// <param name="Fail">The function to execute if the data result is a failure.</param>
|
||||
/// <returns>The result of the executed function.</returns>
|
||||
public static async Task<I?> ThenAsync<I>(this Result result, Func<Task<I>> SuccessAsync)
|
||||
{
|
||||
return result.IsSuccess ? await SuccessAsync() : default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a function based on the success or failure of the result.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Description>This package provides Data Transfer Object (DTO) implementations and related utilities. It includes generic result handling, DTO extension methods, cookie consent settings management, and AutoMapper integration for robust object mapping, all adhering to Clean Architecture principles to ensure separation of concerns and maintainability.</Description>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>DigitalData.Core.DTO</PackageId>
|
||||
<Version>1.0.0.1</Version>
|
||||
<Version>2.0.0.0</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>DigitalData.Core.DTO</Product>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>DigitalData.Core.Infrastructure</PackageId>
|
||||
<Version>1.0.1.1</Version>
|
||||
<Version>2.0.0.0</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>DigitalData.Core.Infrastructure</Product>
|
||||
|
||||
@@ -35,8 +35,8 @@ Global
|
||||
{DB404CD9-CBB8-4771-AB1B-FD4FDE2C28CC}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB404CD9-CBB8-4771-AB1B-FD4FDE2C28CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB404CD9-CBB8-4771-AB1B-FD4FDE2C28CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C57B2480-F632-4691-9C4C-8CC01237203C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C57B2480-F632-4691-9C4C-8CC01237203C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C57B2480-F632-4691-9C4C-8CC01237203C}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C57B2480-F632-4691-9C4C-8CC01237203C}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{C57B2480-F632-4691-9C4C-8CC01237203C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C57B2480-F632-4691-9C4C-8CC01237203C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B54DEF90-C30C-44EA-9875-76F1B330CBB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
||||
Reference in New Issue
Block a user