Last active
August 29, 2015 14:09
-
-
Save YutaWatanabe/ee181f7c80619044a850 to your computer and use it in GitHub Desktop.
Debugging AdMediator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Navigation; | |
using Microsoft.Phone.Controls; | |
using Microsoft.Phone.Shell; | |
using Phone8AppWithMediation.Resources; | |
using System.Diagnostics; | |
namespace Phone8AppWithMediation | |
{ | |
public partial class MainPage : PhoneApplicationPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
AdMediator_Block.AdSdkError += AdMediator_Block_AdError; | |
AdMediator_Block.AdMediatorFilled += AdMediator_Block_AdFilled; | |
AdMediator_Block.AdMediatorError += AdMediator_Block_AdMediatorError; | |
AdMediator_Block.AdSdkEvent += AdMediator_Block_AdSdkEvent; | |
} | |
private void AdMediator_Block_AdSdkEvent(object sender, Microsoft.AdMediator.Core.Events.AdSdkEventArgs e) | |
{ | |
Debug.WriteLine("AdSdk event {0} by {1}", e.EventName, e.Name); | |
} | |
private void AdMediator_Block_AdMediatorError(object sender, Microsoft.AdMediator.Core.Events.AdMediatorFailedEventArgs e) | |
{ | |
Debug.WriteLine("AdMediatorError: " + e.Error + " " + e.ErrorCode); | |
} | |
private void AdMediator_Block_AdFilled(object sender, Microsoft.AdMediator.Core.Events.AdSdkEventArgs e) | |
{ | |
Debug.WriteLine("AdFilled: " + e.Name); | |
} | |
private void AdMediator_Block_AdError(object sender, Microsoft.AdMediator.Core.Events.AdFailedEventArgs e) | |
{ | |
Debug.WriteLine("AdSdkError by {0} ErrorCode: {1} ErrorDescription: {2} Error: {3}", e.Name, e.ErrorCode, e.ErrorDescription, e.Error); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment