/// <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()); } }
/// <summary> /// Returns the singleton client. /// </summary> /// <returns>The client.</returns> public static MoPubClientImpl CreateClient() { if (sInstance == null) { sInstance = new MoPubClientImpl(); } return(sInstance); }