/// <summary> /// Unloads the plug-in. /// </summary> public virtual void Unload() { try { Mainsail.ActivateTrigger -= new EventHandler <TriggerEventArgs>(Mainsail_ActivateTrigger); Mainsail.DeactivateTrigger -= new EventHandler <TriggerEventArgs>(Mainsail_DeactivateTrigger); Mainsail.TriggerEvaluationFailed -= new EventHandler <TriggerFailureEventArgs>(Mainsail_TriggerEvaluationFailed); Mainsail.Dispose(); if (Mainsail.MastInterface is IDisposable) { ((IDisposable)Mainsail.MastInterface).Dispose(); } Mainsail = null; Source = null; StopRetrievingMarkers(); player = null; IsLoaded = false; PluginUnloaded.IfNotNull(i => i(this)); SendLogEntry(LogEntryTypes.Unloaded, message: MastMarkerProviderResources.MastMarkerProviderUnloadedLogMessage); } catch (Exception ex) { PluginUnloadFailed.IfNotNull(i => i(this, ex)); } }
/// <summary> /// Unloads the plugin /// </summary> public void Unload() { try { IsLoaded = false; PluginUnloaded.IfNotNull(i => i(this)); } catch (Exception err) { PluginUnloadFailed.IfNotNull(i => i(this, err)); } }
/// <summary> /// Unloads the plug-in. /// </summary> public void Unload() { try { _syncManager.SuspendSync(); _syncManager = null; IsLoaded = false; PluginUnloaded.IfNotNull(i => i(this)); } catch (Exception err) { PluginUnloadFailed.IfNotNull(i => i(this, err)); } }
/// <summary> /// Unloads a plug-in for progressive download media. /// </summary> public void Unload() { try { IsLoaded = false; DestroyProgressiveMediaElement(); PluginUnloaded.IfNotNull(i => i(this)); SendLogEntry(KnownLogEntryTypes.ProgressiveMediaPluginUnloaded, message: ProgressiveMediaPluginResources.ProgressiveMediaPluginUnloadedLogMessage); } catch (Exception ex) { PluginUnloadFailed.IfNotNull(i => i(this, ex)); } }
public virtual void Unload() { try { foreach (var creative in VpaidController.ActiveCreatives.ToList()) { CancelCreative(creative); } VpaidController.AdIsLinear -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdIsLinear); VpaidController.AdIsNotLinear -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdIsNotLinear); VpaidController.Log -= new EventHandler <ActiveCreativeLogEventArgs>(vPaidController_Log); VpaidController.TrackingFailed -= new EventHandler <VpaidController.TrackingFailureEventArgs>(vPaidController_TrackingFailed); VpaidController.AdLoaded -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdLoaded); VpaidController.AdStopped -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdStopped); VpaidController.AdStarted -= new EventHandler <ActiveCreativeEventArgs>(VpaidController_AdStarted); // Note: all 3 events can use the same handler VpaidController.AdFailed -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdFailed); VpaidController.AdLoadFailed -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdFailed); VpaidController.AdStartFailed -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdFailed); VpaidController.AdRemoved -= new EventHandler <ActiveCreativeEventArgs>(vPaidController_AdCompleted); VpaidController.AdProgressChanged -= new EventHandler <ActiveCreativeEventArgs>(VpaidController_AdProgressChanged); VpaidController.AdPaused -= new EventHandler <ActiveCreativeEventArgs>(VpaidController_AdPaused); VpaidController.AdResumed -= new EventHandler <ActiveCreativeEventArgs>(VpaidController_AdResumed); VpaidController = null; AdHost = null; isLoaded = false; PluginUnloaded.IfNotNull(i => i(this)); } catch (Exception e) { PluginUnloadFailed.IfNotNull(i => i(this, e)); } }