public void Dispose() { if (ad != null) { ad = null; } }
public async void Cache() { await WinRTPlugin.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, delegate() { ad = new AdDuplex.Universal.Controls.WinPhone.XAML.InterstitialAd(unitID); //ad.AdLoaded += ad_AdLoaded;// never fires this, so we manually call it below ad.AdLoadingError += ad_AdLoadingError; ad.NoAd += ad_NoAd; ad.AdClosed += ad_AdClosed; ad.AdClicked += ad_AdClicked; // never fires (this API has been around since WP7, how does this not work...?) ad.IsTest = testing; ad.LoadAd(); // this stops the thread ad_AdLoaded(null, null); }); }
public async void Cache() { await WinRTPlugin.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, delegate() { ad = new AdDuplex.Universal.Controls.WinPhone.XAML.InterstitialAd(unitID); //ad.AdLoaded += ad_AdLoaded;// never fires this, so we manually call it below ad.AdLoadingError += ad_AdLoadingError; ad.NoAd += ad_NoAd; ad.AdClosed += ad_AdClosed; ad.AdClicked += ad_AdClicked;// never fires (this API has been around since WP7, how does this not work...?) ad.IsTest = testing; ad.LoadAd();// this stops the thread ad_AdLoaded(null, null); }); }