示例#1
0
文件: Advertising.cs 项目: akil03/bx
        // Selects one of the created ad client corresponding to the specified network.
        private static IAdClient SelectAdClient(AdNetwork network)
        {
            switch (network)
            {
            case AdNetwork.AdColony:
                return(AdColonyClient);

            case AdNetwork.AdMob:
                return(AdMobClient);

            case AdNetwork.Chartboost:
                return(ChartboostClient);

            case AdNetwork.Heyzap:
                return(HeyzapClient);

            case AdNetwork.UnityAds:
                return(UnityAdsClient);

            case AdNetwork.None:
                return(NoOpClientImpl.CreateClient());

            default:
                throw new NotImplementedException("No client found for the network:" + network.ToString());
            }
        }
示例#2
0
        /// <summary>
        /// Grabs the ready to work (done initialization, setup, etc.)
        /// ad client for the specified network.
        /// </summary>
        /// <returns>The workable ad client.</returns>
        /// <param name="network">Network.</param>
        private static AdClientImpl GetWorkableAdClient(AdNetwork network)
        {
            switch (network)
            {
            case AdNetwork.AdColony:
                return(AdColonyClient);

            case AdNetwork.AdMob:
                return(AdMobClient);

            case AdNetwork.AudienceNetwork:
                return(AudienceNetworkClient);

            case AdNetwork.Heyzap:
                return(HeyzapClient);

            case AdNetwork.MoPub:
                return(MoPubClient);

            case AdNetwork.IronSource:
                return(IronSourceClient);

            case AdNetwork.UnityAds:
                return(UnityAdsClient);

            case AdNetwork.TapJoy:
                return(TapjoyClient);

            case AdNetwork.None:
                return(NoOpClientImpl.CreateClient());

            default:
                throw new NotImplementedException("No client found for the network:" + network.ToString());
            }
        }
示例#3
0
文件: Advertising.cs 项目: akil03/bx
        // Gets the singleton client for the specified network.
        private static IAdClient CreateAdClient(AdNetwork network)
        {
            var settings = EM_Settings.Advertising;

            switch (network)
            {
            case AdNetwork.AdColony:
                return(AdColonyClientImpl.CreateClient(settings));

            case AdNetwork.AdMob:
                return(AdMobClientImpl.CreateClient(settings));

            case AdNetwork.Chartboost:
                return(ChartboostClientImpl.CreateClient(settings));

            case AdNetwork.Heyzap:
                return(HeyzapClientImpl.CreateClient(settings));

            case AdNetwork.UnityAds:
                return(UnityAdsClientImpl.CreateClient(settings));

            case AdNetwork.None:
                return(NoOpClientImpl.CreateClient());

            default:
                throw new NotImplementedException("No client implemented for the network:" + network.ToString());
            }
        }
示例#4
0
 /// <summary>
 /// Creates and initializes the singleton client.
 /// </summary>
 /// <returns>The client.</returns>
 public static NoOpClientImpl CreateClient()
 {
     if (sInstance == null)
     {
         sInstance = new NoOpClientImpl();
     }
     return(sInstance);
 }