Refaktorisierung des Flag-Enums: Flag auf nullable gesetzt, HasFlag-Methode für Nullable-Prüfung aktualisiert, Null-Flag entfernt, SecurityBreachOrDataIntegrity für überlappende Probleme hinzugefügt.
This commit is contained in:
parent
40c3b6fdc1
commit
bb5837047a
Binary file not shown.
Binary file not shown.
@ -14,6 +14,19 @@
|
||||
/// <summary>
|
||||
/// Indicates a security breach or vulnerability has been detected during the service operation.
|
||||
/// </summary>
|
||||
SecurityBreach
|
||||
SecurityBreach,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates a potential issue with data integrity during the service operation.
|
||||
/// This flag is used when data may have been altered, corrupted, or is otherwise unreliable,
|
||||
/// which could impact the accuracy or trustworthiness of the operation's results.
|
||||
/// </summary>
|
||||
DataIntegrityIssue,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that either a security breach, a data integrity issue, or both have been detected during the service operation.
|
||||
/// This flag is used when one or both types of issues are present, requiring heightened attention to both security and data accuracy.
|
||||
/// </summary>
|
||||
SecurityBreachOrDataIntegrity
|
||||
}
|
||||
}
|
||||
@ -51,7 +51,7 @@ namespace DigitalData.Core.Application
|
||||
/// This flag helps in categorizing the state of the operation more granularly.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Enum Flag { get; set; } = Application.Flag.Null;
|
||||
public Enum? Flag { get; set; } = default;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the current service message's flag matches the specified flag.
|
||||
@ -59,7 +59,7 @@ namespace DigitalData.Core.Application
|
||||
/// </summary>
|
||||
/// <param name="flag">The flag to check against the current service message's flag.</param>
|
||||
/// <returns>true if the flags match; otherwise, false.</returns>
|
||||
public bool HasFlag(Enum flag) => Flag.ToString() == flag.ToString();
|
||||
public bool HasFlag(Enum flag) => Flag?.ToString() == flag.ToString();
|
||||
|
||||
/// <summary>
|
||||
/// [Obsolete("Deprecated: Use ClientMessages instead.")]
|
||||
|
||||
Binary file not shown.
@ -19,7 +19,7 @@ namespace DigitalData.Core.Contracts.Application
|
||||
/// This flag helps in categorizing the state of the operation more granularly.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
Enum Flag { get; set; }
|
||||
Enum? Flag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the current service message's flag matches the specified flag.
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user