From 83fd5a5d4bd94004ab17b0a29e0776badf77439e Mon Sep 17 00:00:00 2001 From: rafael-aero Date: Mon, 12 Jul 2021 15:52:30 +0200 Subject: [PATCH] Add manual initialization methods --- ElectronNET.API/App.cs | 6 ++++++ ElectronNET.API/BridgeSettings.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ElectronNET.API/App.cs b/ElectronNET.API/App.cs index 69d8722..0659038 100644 --- a/ElectronNET.API/App.cs +++ b/ElectronNET.API/App.cs @@ -396,6 +396,7 @@ namespace ElectronNET.API } } } + private bool _isReady = false; /// @@ -537,6 +538,11 @@ namespace ElectronNET.API } } + public static void ManuallySetIsReady() + { + Instance.IsReady = true; + } + private static App _app; private static object _syncRoot = new object(); diff --git a/ElectronNET.API/BridgeSettings.cs b/ElectronNET.API/BridgeSettings.cs index 96a2653..4aaef20 100644 --- a/ElectronNET.API/BridgeSettings.cs +++ b/ElectronNET.API/BridgeSettings.cs @@ -20,5 +20,11 @@ /// The web port. /// public static string WebPort { get; internal set; } + + public static void InitializePorts(int socketPort, int webPort) + { + SocketPort = socketPort.ToString(); + WebPort = webPort.ToString(); + } } }