[PR #633] Support DI and Mocking better. #1237

Open
opened 2026-01-29 16:58:47 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/ElectronNET/Electron.NET/pull/633

State: closed
Merged: Yes


Convert main static references off of Electron into interface implementation and expose the underlying Socket for low level interaction.

This is a utility PR to improve support for testing and also better support standard DI practices. Additionally included is exposure of the underlying Socket vie the ApplicationSocket class so that we can support more low level socket interactions without having to update the ElectronNET repo directly.

Note: I applied all the comment documentation to the interfaces but did not convert origination to use <inheritdoc /> as I felt that would be inappropriate without some feedback.

**Original Pull Request:** https://github.com/ElectronNET/Electron.NET/pull/633 **State:** closed **Merged:** Yes --- Convert main static references off of `Electron` into interface implementation and expose the underlying Socket for low level interaction. This is a utility PR to improve support for testing and also better support standard DI practices. Additionally included is exposure of the underlying Socket vie the ApplicationSocket class so that we can support more low level socket interactions without having to update the ElectronNET repo directly. Note: I applied all the comment documentation to the interfaces but did not convert origination to use `<inheritdoc />` as I felt that would be inappropriate without some feedback.
claunia added the pull-request label 2026-01-29 16:58:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#1237