Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debugging AdMediator
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