Skip to content

Support DI and Mocking better. #633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ElectronNET.API/App.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
using System.Threading;
using System.Threading.Tasks;
using ElectronNET.API.Extensions;
using ElectronNET.API.Interfaces;

namespace ElectronNET.API
{
/// <summary>
/// Control your application's event lifecycle.
/// </summary>
public sealed class App
public sealed class App : IApp
{
/// <summary>
/// Emitted when all windows have been closed.
Expand Down
16 changes: 16 additions & 0 deletions ElectronNET.API/ApplicationSocket.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using ElectronNET.API.Interfaces;
using Quobject.SocketIoClientDotNet.Client;

namespace ElectronNET.API
{
/// <summary>
/// Wrapper for the underlying Socket connection
/// </summary>
public class ApplicationSocket : IApplicationSocket
{
/// <summary>
/// Socket used to communicate with main.js
/// </summary>
public Socket Socket { get; internal set; }
}
}
3 changes: 2 additions & 1 deletion ElectronNET.API/AutoUpdater.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ElectronNET.API.Interfaces;

namespace ElectronNET.API
{
/// <summary>
/// Enable apps to automatically update themselves. Based on electron-updater.
/// </summary>
public sealed class AutoUpdater
public sealed class AutoUpdater : IAutoUpdater
{
/// <summary>
/// Whether to automatically download an update when it is found. (Default is true)
Expand Down
3 changes: 2 additions & 1 deletion ElectronNET.API/Clipboard.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using System.Threading.Tasks;
using ElectronNET.API.Interfaces;

namespace ElectronNET.API
{
/// <summary>
/// Perform copy and paste operations on the system clipboard.
/// </summary>
public sealed class Clipboard
public sealed class Clipboard : IClipboard
{
private static Clipboard _clipboard;
private static object _syncRoot = new object();
Expand Down
3 changes: 2 additions & 1 deletion ElectronNET.API/Dialog.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web;
using ElectronNET.API.Interfaces;

namespace ElectronNET.API
{
/// <summary>
/// Display native system dialogs for opening and saving files, alerting, etc.
/// </summary>
public sealed class Dialog
public sealed class Dialog : IDialog
{
private static Dialog _dialog;
private static object _syncRoot = new object();
Expand Down
3 changes: 2 additions & 1 deletion ElectronNET.API/Dock.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Threading.Tasks;
using ElectronNET.API.Entities;
using ElectronNET.API.Extensions;
using ElectronNET.API.Interfaces;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
Expand All @@ -12,7 +13,7 @@ namespace ElectronNET.API
/// <summary>
/// Control your app in the macOS dock.
/// </summary>
public sealed class Dock
public sealed class Dock : IDock
{
private static Dock _dock;
private static object _syncRoot = new object();
Expand Down
Empty file modified ElectronNET.API/ElectronNET.API.csproj
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion ElectronNET.API/GlobalShortcut.cs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ElectronNET.API.Interfaces;

namespace ElectronNET.API
{
/// <summary>
/// Detect keyboard events when the application does not have keyboard focus.
/// </summary>
public sealed class GlobalShortcut
public sealed class GlobalShortcut : IGlobalShortcut
{
private static GlobalShortcut _globalShortcut;
private static object _syncRoot = new object();
Expand Down
3 changes: 2 additions & 1 deletion ElectronNET.API/HostHook.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Newtonsoft.Json.Serialization;
using System;
using System.Threading.Tasks;
using ElectronNET.API.Interfaces;

namespace ElectronNET.API
{
Expand All @@ -13,7 +14,7 @@ namespace ElectronNET.API
/// ElectronHostHook directory:
/// <c>electronize add HostHook</c>
/// </summary>
public sealed class HostHook
public sealed class HostHook : IHostHook
{
private static HostHook _electronHostHook;
private static object _syncRoot = new object();
Expand Down
Loading