public virtual void Load() { try { VpaidController = new VpaidController(); 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); isLoaded = true; PluginLoaded.IfNotNull(i => i(this)); } catch (Exception e) { PluginLoadFailed.IfNotNull(i => i(this, e)); } }
/// <summary> /// Loads the plug-in. /// </summary> public void Load() { try { _settings = ReadSettings(); _syncManager = new VideoSyncManager(_settings); IsLoaded = true; PluginLoaded.IfNotNull(i => i(this)); } catch (Exception err) { PluginLoadFailed.IfNotNull(i => i(this, err)); } }
/// <summary> /// Loads a plug-in for playing progressive download media. /// </summary> public void Load() { try { InitializeProgressiveMediaElement(); IsLoaded = true; PluginLoaded.IfNotNull(i => i(this)); SendLogEntry(KnownLogEntryTypes.ProgressiveMediaPluginLoaded, message: ProgressiveMediaPluginResources.ProgressiveMediaPluginLoadedLogMessage); } catch (Exception ex) { PluginLoadFailed.IfNotNull(i => i(this, ex)); } }
/// <summary> /// Loads the plug-in. /// </summary> public virtual void Load() { try { IsLoaded = true; SendLogEntry(LogEntryTypes.Loaded, message: MastMarkerProviderResources.MastMarkerProviderLoadedLogMessage); PluginLoaded.IfNotNull(i => i(this)); } catch (Exception ex) { PluginLoadFailed.IfNotNull(i => i(this, ex)); } }
/// <summary> /// Loads the plugin /// </summary> public void Load() { current = this; try { IsLoaded = true; PluginLoaded.IfNotNull(i => i(this)); } catch (Exception err) { IsLoaded = false; PluginLoadFailed.IfNotNull(i => i(this, err)); } }
internal async void OnFailedLoadingPlugin(string fullPath, Exception e) { await _taskFactory.StartNew(() => PluginLoadFailed?.Invoke(this, new PluginWatchExceptionEventArgs(fullPath, e))).ConfigureAwait(false); }