Пример #1
0
        /// <summary>
        /// The class constructor.
        /// <param name="blockId"> Unique ad placement ID created at partner interface. Example: R-M-DEMO-240x400-context.</param>
        /// </summary>
        public Interstitial(string blockId)
        {
            this.adRequestFactory = new AdRequestCreator();
            this.client           = YandexMobileAdsClientFactory.BuildInterstitialClient(blockId);

            ConfigureInterstitialEvents();
        }
Пример #2
0
        /// <summary>
        /// The class constructor.
        /// <param name="blockId"> Unique ad placement ID created at partner interface. Example: R-M-DEMO-320x50.</param>
        /// <param name="adSize"> The size of banner ad. <see cref="YandexMobileAds.Base.AdSize"/></param>
        /// <param name="position"> Banner position on screen <see cref="YandexMobileAds.Base.AdPosition"/></param>
        /// </summary>
        public Banner(string blockId, AdSize adSize, AdPosition position)
        {
            this.adRequestFactory = new AdRequestCreator();
            this.client           = YandexMobileAdsClientFactory.BuildBannerClient(blockId, adSize, position);

            ConfigureBannerEvents();
        }
Пример #3
0
        public RewardedAd(string blockId)
        {
            this.adRequestFactory = new AdRequestCreator();
            this.client           = YandexMobileAdsClientFactory.BuildRewardedAdClient(blockId);

            ConfigureRewardedAdEvents();
        }
Пример #4
0
        public static void SetUserConsent(bool consent)
        {
            IMobileAdsClient mobileAds = YandexMobileAdsClientFactory.CreateMobileAdsClient();

            mobileAds.SetUserConsent(consent);
        }