Skip to content

AddEventListener support for IDesktopAgent and IPrivateChannel#170

Merged
bingenito merged 5 commits intofinos:mainfrom
bingenito:AddEventListener
Feb 25, 2025
Merged

AddEventListener support for IDesktopAgent and IPrivateChannel#170
bingenito merged 5 commits intofinos:mainfrom
bingenito:AddEventListener

Conversation

@bingenito
Copy link
Member

Implementation of core event system of FDC3 2.2


THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF THE FINOS CORPORATE CONTRIBUTOR LICENSE AGREEMENT.

THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.

@bingenito bingenito requested a review from a team as a code owner January 16, 2025 20:52
@bingenito bingenito marked this pull request as draft January 16, 2025 20:53
@bingenito
Copy link
Member Author

I will add tests for the concrete event classes to ensure constructor initialization is done correctly

kriswest
kriswest previously approved these changes Jan 17, 2025
Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

LGTM - but needs the UserChannelChanged event to fire on leaving the channel as well as switching channel

@kemerava
Copy link

@bingenito Thanks for working on this! So just to clarify, are you proposing to just stick with the Fdc3Event and not create the type of the IApiEvent? I see how it does not add much value, especially if you use your definitions of IFdc3Event and Fdc3Event so I am fine with modifying it that way
Please let me know if I am correct in my understading and I can modify my PR

@psmulovics
Copy link
Contributor

@kemerava I am with @bingenito on this - C# (and I think Java too) do not have the expressiveness to have the same notion as is expressed in the TS definition when comes to the typedness of these

@bingenito bingenito marked this pull request as ready for review January 21, 2025 19:24
Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

One unimplemented function (removing listeners), a question and a minor typo.

@bingenito bingenito requested a review from a team February 3, 2025 17:09
Co-authored-by: Kris West <kris.west@gmail.com>
@bingenito bingenito marked this pull request as draft February 3, 2025 17:10
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.95%. Comparing base (efb171e) to head (4228190).
Report is 131 commits behind head on main.

Files with missing lines Patch % Lines
src/Fdc3/Fdc3Event.cs 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #170      +/-   ##
==========================================
+ Coverage   75.93%   77.95%   +2.02%     
==========================================
  Files          55       63       +8     
  Lines         453      549      +96     
  Branches       49       49              
==========================================
+ Hits          344      428      +84     
- Misses         87       98      +11     
- Partials       22       23       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bingenito bingenito marked this pull request as ready for review February 3, 2025 19:30
@kriswest
Copy link
Contributor

kriswest commented Feb 5, 2025

Associated FDC3 docs PR:

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

LGTM

@bingenito bingenito merged commit a20020a into finos:main Feb 25, 2025
3 checks passed
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.

5 participants