Пример #1
0
        private static void InterstitialWillLeaveApplicationCallback(IntPtr interstitialClient)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdLeavingApplication != null)
            {
                client.OnAdLeavingApplication(client, EventArgs.Empty);
            }
        }
Пример #2
0
        private static void InterstitialWillPresentScreenCallback(IntPtr interstitialClient)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdOpening != null)
            {
                client.OnAdOpening(client, EventArgs.Empty);
            }
        }
Пример #3
0
        private static void InterstitialDidDismissScreenCallback(IntPtr interstitialClient)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdClosed != null)
            {
                client.OnAdClosed(client, EventArgs.Empty);
            }
        }
        private static void AdDidRecordImpressionCallback(IntPtr interstitialClient)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdDidRecordImpression != null)
            {
                client.OnAdDidRecordImpression(client, EventArgs.Empty);
            }
        }
Пример #5
0
        private static void InterstitialDidReceiveAdCallback(IntPtr interstitialClient)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdLoaded != null)
            {
                client.OnAdLoaded(client, EventArgs.Empty);
            }
        }
        private static void AdDidDismissFullScreenContentCallback(IntPtr interstitialClient)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdDidDismissFullScreenContent != null)
            {
                client.OnAdDidDismissFullScreenContent(client, EventArgs.Empty);
            }
        }
        private static void InterstitialDidFailToReceiveAdWithErrorCallback(
            IntPtr interstitialClient, string error)
        {
            InterstitialClient      client = IntPtrToInterstitialClient(interstitialClient);
            AdFailedToLoadEventArgs args   = new AdFailedToLoadEventArgs()
            {
                Message = error
            };

            client.OnAdFailedToLoad(client, args);
        }
        private static void AdFailedToPresentFullScreenContentCallback(IntPtr interstitialClient, IntPtr error)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdFailedToPresentFullScreenContent != null)
            {
                AdErrorClientEventArgs args = new AdErrorClientEventArgs()
                {
                    AdErrorClient = new AdErrorClient(error)
                };
                client.OnAdFailedToPresentFullScreenContent(client, args);
            }
        }
        private static void InterstitialFailedToLoadCallback(
            IntPtr interstitialClient, IntPtr error)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdFailedToLoad != null)
            {
                LoadAdErrorClientEventArgs args = new LoadAdErrorClientEventArgs()
                {
                    LoadAdErrorClient = new LoadAdErrorClient(error)
                };
                client.OnAdFailedToLoad(client, args);
            }
        }
        private static void InterstitialDidFailToReceiveAdWithErrorCallback(
            IntPtr interstitialClient, IntPtr error)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnAdFailedToLoad != null)
            {
                LoadAdErrorClientEventArgs args = new LoadAdErrorClientEventArgs()
                {
                    LoadAdErrorClient = new LoadAdErrorClient(error),
                    Message           = Externs.GADUGetAdErrorMessage(error)
                };
                client.OnAdFailedToLoad(client, args);
            }
        }
Пример #11
0
        private static void InterstitialPaidEventCallback(
            IntPtr interstitialClient, int precision, long value, string currencyCode)
        {
            InterstitialClient client = IntPtrToInterstitialClient(interstitialClient);

            if (client.OnPaidEvent != null)
            {
                AdValue adValue = new AdValue()
                {
                    Precision    = (AdValue.PrecisionType)precision,
                    Value        = value,
                    CurrencyCode = currencyCode
                };
                AdValueEventArgs args = new AdValueEventArgs()
                {
                    AdValue = adValue
                };

                client.OnPaidEvent(client, args);
            }
        }
Пример #12
0
 internal static extern void GADUSetInterstitialCallbacks(
         IntPtr interstitial,
         InterstitialClient.GADUInterstitialDidReceiveAdCallback adReceivedCallback,
         InterstitialClient.GADUInterstitialDidFailToReceiveAdWithErrorCallback
                 adFailedCallback,
         InterstitialClient.GADUInterstitialWillPresentScreenCallback willPresentCallback,
         InterstitialClient.GADUInterstitialDidDismissScreenCallback didDismissCallback,
         InterstitialClient.GADUInterstitialWillLeaveApplicationCallback
                 willLeaveCallback
 );