25 public event EventHandler<AppOpenAdLoadedEventArgs>
OnAdLoaded;
33 private readonly IAppOpenAdLoaderClient _client;
41 this._client = YandexMobileAdsClientFactory.BuildAppOpenAdLoaderClient();
43 MainThreadDispatcher.initialize();
44 ConfigureAppOpenAdEvents();
54 _client.LoadAd(_adRequestConfigurationFactory.CreateAdRequestConfiguration(configuration));
62 this._client.CancelLoading();
65 private void ConfigureAppOpenAdEvents()
67 this._client.OnAdLoaded += (sender, args) =>
69 if (this.OnAdLoaded ==
null)
74 MainThreadDispatcher.EnqueueAction(() =>
76 if (this.OnAdLoaded ==
null)
81 AppOpenAdLoadedEventArgs adLoadedEventArgs =
new AppOpenAdLoadedEventArgs()
89 this._client.OnAdFailedToLoad += (sender, args) =>
91 if (this.OnAdFailedToLoad ==
null)
96 MainThreadDispatcher.EnqueueAction(() =>
98 if (this.OnAdFailedToLoad ==
null)