DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/DetectOperations/EnabledSubsystemsFlagsExtensions.cs

15 lines
507 B
C#
Raw Normal View History

using AsbCloudApp.Data.DetectedOperation;
namespace AsbCloudInfrastructure.Services.DetectOperations;
public static class EnabledSubsystemsFlagsExtensions
{
/// <summary>
/// Есть ли флаг подсистемы у операции
/// </summary>
/// <param name="flags"></param>
/// <param name="enabledSubsystems"></param>
/// <returns></returns>
public static bool HasEnabledSubsystems(this EnabledSubsystemsFlags flags, int enabledSubsystems)
=> (enabledSubsystems & (int)flags) > 0;
}