/// <summary> /// Gets the singleton ad client of the specified network. /// This may or may not be initialized. /// </summary> /// <returns>The ad client.</returns> /// <param name="network">Network.</param> private static AdClientImpl GetAdClient(AdNetwork network) { switch (network) { case AdNetwork.AdColony: return(AdColonyClientImpl.CreateClient()); case AdNetwork.AdMob: return(AdMobClientImpl.CreateClient()); case AdNetwork.AudienceNetwork: return(AudienceNetworkClientImpl.CreateClient()); case AdNetwork.Heyzap: return(HeyzapClientImpl.CreateClient()); case AdNetwork.IronSource: return(IronSourceClientImpl.CreateClient()); case AdNetwork.MoPub: return(MoPubClientImpl.CreateClient()); case AdNetwork.TapJoy: return(TapjoyClientImpl.CreateClient()); case AdNetwork.UnityAds: return(UnityAdsClientImpl.CreateClient()); case AdNetwork.None: return(NoOpClientImpl.CreateClient()); default: throw new NotImplementedException("No client implemented for the network:" + network.ToString()); } }
// 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()); } }