Files
MeadeGeneric/Meade.net/ReferenceCountedObject.cs
T
ColinD 79a77d4e1d Merged in feature/LocalServer (pull request #5)
Feature/LocalServer

* Major refactor.  Switching over to a local server hub style driver allowing multiple programs to control the telescope at one time without the need for the POTH Hub

* Unified the setup dialog

* Implemented shared serial port, Both Telescope and Driver can connect at the same time.

* Ported the focuser implementation from the non server based version.

* Ported the telescope driver code.

* Fixed problem with # not being stripped from the returned string ends. Fixed issue with RA being returned as degress rather than hours.

* Telescope passes validation

* Added a lock around the focuser move.

* Reimplemented CommandBlind and CommandString

* Corrected version information

* Removed the Altitude support as there's a bug in the Autostar and Audiostar firmware
2019-05-17 14:21:26 +00:00

25 lines
641 B
C#

using System;
using System.Runtime.InteropServices;
namespace ASCOM.Meade.net
{
[ComVisible(false)]
public class ReferenceCountedObjectBase
{
public ReferenceCountedObjectBase()
{
// We increment the global count of objects.
Server.CountObject();
}
~ReferenceCountedObjectBase()
{
// We decrement the global count of objects.
Server.UncountObject();
// We then immediately test to see if we the conditions
// are right to attempt to terminate this server application.
Server.ExitIf();
}
}
}