Hinzugefügt WithFlag Methode zu ServiceMessageExtensions für das direkte Setzen von Flags auf IServiceMessage Instanzen.
This commit is contained in:
parent
4dea6b9b00
commit
40c3b6fdc1
Binary file not shown.
@ -10,6 +10,19 @@ namespace DigitalData.Core.Application
|
||||
/// </summary>
|
||||
public static class ServiceMessageExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the specified flag on the service message or result, allowing for the categorization of the message based on specific conditions or statuses.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of IServiceMessage.</typeparam>
|
||||
/// <param name="serviceMessage">The service message instance to modify.</param>
|
||||
/// <param name="flag">The flag to set, indicating a specific condition or status.</param>
|
||||
/// <returns>The service message instance with the updated flag, facilitating fluent chaining of methods.</returns>
|
||||
public static T WithFlag<T>(this T serviceMessage, Enum flag) where T : IServiceMessage
|
||||
{
|
||||
serviceMessage.Flag = flag;
|
||||
return serviceMessage;
|
||||
}
|
||||
|
||||
#region ClientMessage
|
||||
/// <summary>
|
||||
/// Adds a single client message to the service message.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user