Überarbeiten Sie die Methoden zur Handhabung von Service-Nachrichtenflags, stellen Sie sicher, dass sie ordnungsgemäß in ICollection konvertiert werden, und verbessern Sie die Klarheit.
This commit is contained in:
@@ -15,19 +15,19 @@ namespace DigitalData.Core.Contracts.Application
|
||||
bool IsSuccess { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the flag that indicates the specific status type of the service operation.
|
||||
/// This flag helps in categorizing the state of the operation more granularly.
|
||||
/// Represents the list of flags that indicate specific types of statuses or conditions in a service operation.
|
||||
/// These flags help in categorizing the state of the operation more granularly, allowing for multiple conditions to be represented simultaneously.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
Enum? Flag { get; set; }
|
||||
public ICollection<Enum> Flags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the current service message's flag matches the specified flag.
|
||||
/// This method is useful for conditional logic based on the status of the operation.
|
||||
/// Checks if any of the current service message's flags matches the specified flag based on their string representations.
|
||||
/// This method is useful for conditional logic where the exact string representation of the flag values is crucial.
|
||||
/// </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();
|
||||
/// <param name="flag">The flag to check against the current service message's flags.</param>
|
||||
/// <returns>true if a flag with a matching string representation exists; otherwise, false.</returns>
|
||||
public bool HasFlag(Enum flag) => Flags.Any(f => f.ToString() == flag.ToString());
|
||||
|
||||
/// <summary>
|
||||
/// [Obsolete("Deprecated: Use ClientMessages instead.")]
|
||||
|
||||
Binary file not shown.
@@ -34,3 +34,15 @@ E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\
|
||||
E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\refint\DigitalData.Core.Contracts.dll
|
||||
E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.pdb
|
||||
E:\TekH\Visual Studio\DDWeb\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\ref\DigitalData.Core.Contracts.dll
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\bin\Debug\net7.0\DigitalData.Core.Contracts.deps.json
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\bin\Debug\net7.0\DigitalData.Core.Contracts.dll
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\bin\Debug\net7.0\DigitalData.Core.Contracts.pdb
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.csproj.AssemblyReference.cache
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.GeneratedMSBuildEditorConfig.editorconfig
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.AssemblyInfoInputs.cache
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.AssemblyInfo.cs
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.csproj.CoreCompileInputs.cache
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.dll
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\refint\DigitalData.Core.Contracts.dll
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\DigitalData.Core.Contracts.pdb
|
||||
E:\TekH\Visual Studio\WebCoreModules\DigitalData.Core.Contracts\obj\Debug\net7.0\ref\DigitalData.Core.Contracts.dll
|
||||
|
||||
Reference in New Issue
Block a user