public void Dispose() { Consumer?.Dispose(); ByteProducer?.Dispose(); MessageDataProducer?.Dispose(); ApiSender?.Dispose(); }
public void Dispose() { if (isDisposed_) { return; } this.TelemetryClient.TrackEvent("PluginDisposed."); this.TelemetryClient.Flush(); apiSender_?.Dispose(); viewModel_?.Dispose(); Settings.Default.PropertyChanged -= Settings_PropertyChanged; isDisposed_ = true; GC.SuppressFinalize(this); }