feat(lmxproxy): phase 1 — v2 protocol types and domain model
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
namespace ZB.MOM.WW.LmxProxy.Client.Domain;
|
||||
|
||||
/// <summary>Extension methods for <see cref="Quality"/>.</summary>
|
||||
public static class QualityExtensions
|
||||
{
|
||||
public static bool IsGood(this Quality q) => (byte)q >= 128;
|
||||
public static bool IsUncertain(this Quality q) => (byte)q is >= 64 and < 128;
|
||||
public static bool IsBad(this Quality q) => (byte)q < 64;
|
||||
/// <summary>Returns true if quality is in the Good family (byte >= 192).</summary>
|
||||
public static bool IsGood(this Quality q) => (byte)q >= 192;
|
||||
|
||||
/// <summary>Returns true if quality is in the Uncertain family (byte 64-127).</summary>
|
||||
public static bool IsUncertain(this Quality q) => (byte)q is >= 64 and < 128;
|
||||
|
||||
/// <summary>Returns true if quality is in the Bad family (byte < 64).</summary>
|
||||
public static bool IsBad(this Quality q) => (byte)q < 64;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user