Methoden zur DTOExtensions hinzugefügt, um die Handhabung von booleschen DataResults zu verbessern.
This commit is contained in:
parent
f21944f177
commit
5c016be71a
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user