26 public event EventHandler<RewardedAdLoadedEventArgs>
OnAdLoaded;
34 private readonly IRewardedAdLoaderClient _client;
42 this._client = YandexMobileAdsClientFactory.BuildRewardedAdLoaderClient();
44 MainThreadDispatcher.initialize();
45 ConfigureRewardedEvents();
55 _client.LoadAd(_adRequestConfigurationFactory.CreateAdRequestConfiguration(adRequestConfiguration));
63 _client.CancelLoading();
66 private void ConfigureRewardedEvents()
68 this._client.OnAdLoaded += (sender, args) =>
70 if (this.OnAdLoaded ==
null)
75 MainThreadDispatcher.EnqueueAction(() =>
77 if (this.OnAdLoaded ==
null)
82 RewardedAdLoadedEventArgs adLoadedEventArgs =
new RewardedAdLoadedEventArgs()
90 this._client.OnAdFailedToLoad += (sender, args) =>
92 if (this.OnAdFailedToLoad ==
null)
97 MainThreadDispatcher.EnqueueAction(() =>
99 if (this.OnAdFailedToLoad ==
null)