Methoden zur DTOExtensions hinzugefügt, um die Handhabung von booleschen DataResults zu verbessern.

This commit is contained in:
Developer 02 2024-06-06 10:40:48 +02:00
parent f21944f177
commit 5c016be71a

View File

@ -144,5 +144,9 @@ namespace DigitalData.Core.DTO
public static void LogNotice(this ILogger logger, Result result, string start = ": ", string seperator = ". ", string end = ".\n")
=> logger.LogNotice(notices: result.Notices, start: start, seperator: seperator, end: end);
public static bool IsRight(this DataResult<bool> bResult) => bResult.Data;
public static bool IsWrong(this DataResult<bool> bResult) => !bResult.Data;
}
}