Skip to content

Fix/fix e control method enum values#1422

Merged
ndorin merged 2 commits into
mainfrom
fix/fix-eControlMethod-enum-values
May 20, 2026
Merged

Fix/fix e control method enum values#1422
ndorin merged 2 commits into
mainfrom
fix/fix-eControlMethod-enum-values

Conversation

@ndorin
Copy link
Copy Markdown
Contributor

@ndorin ndorin commented May 20, 2026

Closes #1421

This pull request updates the eControlMethod enum in eControlMethods.cs to explicitly assign integer values to each member and reorders the UdpClient entry. This change ensures that the enum values are stable and predictable, which is important for serialization, interoperability, and backward compatibility.

Enum improvements and maintenance:

  • Explicitly assigned integer values to all members of the eControlMethod enum to ensure stable and predictable values.
  • Moved the UdpClient entry to the end of the enum and assigned it the next available integer value (18), ensuring the order and values are clear and consistent.

@ndorin ndorin self-assigned this May 20, 2026
Copilot AI review requested due to automatic review settings May 20, 2026 22:18
@ndorin ndorin requested a review from andrew-welker May 20, 2026 22:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a backward-compatibility regression by stabilizing the backing integer values of eControlMethod (used across comm configuration/serialization and consumer switch statements), preventing ordinal shifts when new enum members are added.

Changes:

  • Assign explicit integer values to all eControlMethod members to make values stable across releases.
  • Reorder UdpClient to the end of the enum and assign it the next available value (18) so earlier members retain historical values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/PepperDash.Core/Comm/eControlMethods.cs
@ndorin ndorin requested a review from hvolmer May 20, 2026 22:28
@ndorin ndorin merged commit 469999b into main May 20, 2026
6 checks passed
@ndorin ndorin deleted the fix/fix-eControlMethod-enum-values branch May 20, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]- v2.36.0 introduces a new eControlMethod value UdpClient that caused an inadvertent breaking change

3 participants