mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
chore: update plan for finalizer removal
This commit is contained in:
parent
b86f2df89b
commit
cffcfbbda1
1 changed files with 6 additions and 0 deletions
|
|
@ -119,6 +119,9 @@ namespace PepperDash.Essentials.Core
|
|||
/// </summary>
|
||||
~ComPortController()
|
||||
{
|
||||
if (Port == null)
|
||||
return;
|
||||
|
||||
Port.SerialDataReceived -= Port_SerialDataReceived;
|
||||
}
|
||||
|
||||
|
|
@ -156,6 +159,9 @@ namespace PepperDash.Essentials.Core
|
|||
/// <inheritdoc />
|
||||
public override bool Deactivate()
|
||||
{
|
||||
if (Port == null)
|
||||
return false;
|
||||
|
||||
return Port.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue