mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
[PR #633] [MERGED] Support DI and Mocking better. #1234
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ElectronNET/Electron.NET/pull/633
Author: @danatcofo
Created: 12/7/2021
Status: ✅ Merged
Merged: 4/6/2022
Merged by: @GregorBiswanger
Base:
master← Head:feature/DI-MOCK📝 Commits (1)
1b14bb0Convert main static references off ofElectroninto interface implementation and expose the underlying Socket for low level interaction.📊 Changes
36 files changed (+1960 additions, -18 deletions)
View changed files
📝
ElectronNET.API/App.cs(+2 -1)➕
ElectronNET.API/ApplicationSocket.cs(+16 -0)📝
ElectronNET.API/AutoUpdater.cs(+2 -1)📝
ElectronNET.API/Clipboard.cs(+2 -1)📝
ElectronNET.API/Dialog.cs(+2 -1)📝
ElectronNET.API/Dock.cs(+2 -1)📝
ElectronNET.API/ElectronNET.API.csproj(+0 -0)📝
ElectronNET.API/GlobalShortcut.cs(+2 -1)📝
ElectronNET.API/HostHook.cs(+2 -1)➕
ElectronNET.API/Interfaces/IApp.cs(+713 -0)➕
ElectronNET.API/Interfaces/IApplicationSocket.cs(+15 -0)➕
ElectronNET.API/Interfaces/IAutoUpdater.cs(+146 -0)➕
ElectronNET.API/Interfaces/IClipboard.cs(+122 -0)➕
ElectronNET.API/Interfaces/IDialog.cs(+102 -0)➕
ElectronNET.API/Interfaces/IDock.cs(+93 -0)➕
ElectronNET.API/Interfaces/IGlobalShortcut.cs(+39 -0)➕
ElectronNET.API/Interfaces/IHostHook.cs(+30 -0)➕
ElectronNET.API/Interfaces/IIpcMain.cs(+65 -0)➕
ElectronNET.API/Interfaces/IMenu.cs(+47 -0)➕
ElectronNET.API/Interfaces/INativeTheme.cs(+101 -0)...and 16 more files
📄 Description
Convert main static references off of
Electroninto 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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.