private void Destroy() { PublishTimer?.Stop(); PublishTimer = null; EventBridge.Instance.RemoveEventPublisher(this); EventBridge.Instance.UnsubscribeFromAllEvents(this); Instance = null; }
public static void Initialize() { if (Instance != null) { Instance.Destroy(); } switch (ConfigManager.Settings.Contents.tpmsType) { case Enums.Parsing.TpmsType.PressurePro: Instance = new PProTireManager(); break; case Enums.Parsing.TpmsType.TST: Instance = new TSTTireManager(); break; } }