Changed the initialisation order to avoid issue with ISharedResourcesWrapper being called before it's created.

This commit is contained in:
2019-07-08 22:07:35 +01:00
parent ca3dd0e4fd
commit f8cbc3fa8d
2 changed files with 15 additions and 20 deletions
+8 -8
View File
@@ -74,20 +74,20 @@ namespace ASCOM.Meade.net
/// </summary>
public Telescope()
{
tl = new TraceLogger("", "Meade.net.Telescope");
ReadProfile(); // Read device configuration from the ASCOM Profile store
tl.LogMessage("Telescope", "Starting initialisation");
IsConnected = false; // Initialise connected to false
//todo move this out to IOC
_utilities = new Util(); //Initialise util object
_utilitiesExtra = new Util(); //Initialise util object
_astroUtilities = new AstroUtils(); // Initialise astro utilities object
_sharedResourcesWrapper = new SharedResourcesWrapper();
//TODO: Implement your additional construction here
_astroMaths = new AstroMaths();
tl = new TraceLogger("", "Meade.net.Telescope");
tl.LogMessage("Telescope", "Starting initialisation");
ReadProfile(); // Read device configuration from the ASCOM Profile store
IsConnected = false; // Initialise connected to false
tl.LogMessage("Telescope", "Completed initialisation");
}