Describe the feature
The ClientTrackingInfo.Flags property currently uses IReadOnlySet<string> to represent tracking flags (e.g. "on", "off", "bcast", "optin", "optout", "noloop"). For consistency with ClientFlag, ClientCapability, and FileDescriptorEvent, this should be replaced with a typed enum.
Use Case
Type safety and discoverability. Currently users must compare against magic strings ("on", "bcast", etc.) which is error-prone. A typed enum provides IntelliSense, compile-time checking, and consistency with the patterns established in ClientInfo.
Proposed Solution
Add a ClientTrackingFlag enum:
public enum ClientTrackingFlag
{
On,
Off,
Broadcast,
OptIn,
OptOut,
NoLoop,
}
Change ClientTrackingInfo.Flags from IReadOnlySet<string> to IReadOnlySet<ClientTrackingFlag>.
Update the response converter in Request.ConnectionManagement.cs to map string values to enum values.
Related
Additional Information
⚪ None
Describe the feature
The
ClientTrackingInfo.Flagsproperty currently usesIReadOnlySet<string>to represent tracking flags (e.g."on","off","bcast","optin","optout","noloop"). For consistency withClientFlag,ClientCapability, andFileDescriptorEvent, this should be replaced with a typed enum.Use Case
Type safety and discoverability. Currently users must compare against magic strings (
"on","bcast", etc.) which is error-prone. A typed enum provides IntelliSense, compile-time checking, and consistency with the patterns established inClientInfo.Proposed Solution
Add a
ClientTrackingFlagenum:Change
ClientTrackingInfo.FlagsfromIReadOnlySet<string>toIReadOnlySet<ClientTrackingFlag>.Update the response converter in
Request.ConnectionManagement.csto map string values to enum values.Related
CLIENT INFOcommand support #414 — CLIENT INFO / CLIENT LIST implementation established the typed enum pattern (ClientFlag,FileDescriptorEvent,ClientCapability)Additional Information
⚪ None