From 465d4cb5d93d0268eadaf1928d9a1b59f80e942e Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 8 Jul 2019 22:17:05 +0100 Subject: [PATCH] Seperated out the non ioc init code to it's own method --- Meade.net.Telescope/Telescope.cs | 5 +++++ Meade.net.focuser/Focuser.cs | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 2e698dd..886a772 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -81,6 +81,11 @@ namespace ASCOM.Meade.net _sharedResourcesWrapper = new SharedResourcesWrapper(); _astroMaths = new AstroMaths(); + Initialise(); + } + + private void Initialise() + { tl = new TraceLogger("", "Meade.net.Telescope"); tl.LogMessage("Telescope", "Starting initialisation"); diff --git a/Meade.net.focuser/Focuser.cs b/Meade.net.focuser/Focuser.cs index 73ebca4..62d4ba3 100644 --- a/Meade.net.focuser/Focuser.cs +++ b/Meade.net.focuser/Focuser.cs @@ -68,13 +68,19 @@ namespace ASCOM.Meade.net //todo move this out to IOC _utilities = new Util(); //Initialise util object _sharedResourcesWrapper = new SharedResourcesWrapper(); + + Initialise(); + } + + private void Initialise() + { tl = new TraceLogger("", "Meade.net.focusser"); - + tl.LogMessage("Focuser", "Starting initialisation"); ReadProfile(); // Read device configuration from the ASCOM Profile store IsConnected = false; // Initialise connected to false - + tl.LogMessage("Focuser", "Completed initialisation"); }