Skip to content

feat: implement constructor for BridgeApi with key and name parameters#1395

Merged
ediablo80 merged 1 commit into
mainfrom
fix/implement-IKeyed-on-BridgeBase
Mar 12, 2026
Merged

feat: implement constructor for BridgeApi with key and name parameters#1395
ediablo80 merged 1 commit into
mainfrom
fix/implement-IKeyed-on-BridgeBase

Conversation

@ndorin
Copy link
Copy Markdown
Contributor

@ndorin ndorin commented Mar 12, 2026

This pull request introduces a minor enhancement to the bridge API infrastructure by adding support for passing a name parameter to the BridgeApi constructor. This allows for more descriptive instantiation of bridge APIs, particularly when creating advanced EISC API objects.

Constructor enhancements:

  • Added a new protected constructor to the BridgeApi class that accepts both key and name parameters, enabling derived classes to specify a device name during instantiation.
  • Updated the EiscApiAdvanced class to use the new BridgeApi constructor, passing both dc.Key and dc.Name for improved clarity and consistency.

@ediablo80 ediablo80 merged commit 305a466 into main Mar 12, 2026
4 checks passed
@ediablo80 ediablo80 deleted the fix/implement-IKeyed-on-BridgeBase branch March 12, 2026 20:30
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

Adds support for specifying a device name when constructing bridge API implementations, aligning bridge instances with the broader Device/EssentialsDevice key+name model.

Changes:

  • Added a new protected BridgeApi(string key, string name) constructor that forwards to EssentialsDevice(key, name).
  • Updated EiscApiAdvanced to pass dc.Name when constructing the base BridgeApi.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +37 to +38
/// <param name="key"></param>
/// <param name="name"></param>
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The XML doc comments for this new constructor have empty <param> descriptions. Please document what key and name represent (similar to the existing single-parameter constructor) so generated docs/intellisense are useful.

Suggested change
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="key">Device key</param>
/// <param name="name">Device name</param>

Copilot uses AI. Check for mistakes.
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.

3 participants