Example #1
0
        private static string GetMediationSettingsClassName(this MoPubSettings.MediatedNetwork mediatedNetwork)
        {
            if (mediatedNetwork == null)
            {
                return(null);
            }

            if (!mediatedNetwork.IsSupportedNetwork)
            {
                return(mediatedNetwork.MediationSettingsClassName);
            }

            switch (mediatedNetwork.SupportedNetworkName)
            {
            case MoPubSettings.SupportedNetwork.AdColony:
                return(new MoPub.SupportedNetwork.AdColony().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.AdMob:
                return(new MoPub.SupportedNetwork.AdMob().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.AppLovin:
                return(new MoPub.SupportedNetwork.AppLovin().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Chartboost:
                return(new MoPub.SupportedNetwork.Chartboost().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Facebook:
                return(new MoPub.SupportedNetwork.Facebook().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Furry:
                return(new MoPub.SupportedNetwork.Flurry().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.IronSource:
                return(new MoPub.SupportedNetwork.IronSource().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Pangle:
                return(new MoPub.SupportedNetwork.Pangle().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Snap:
                return(new MoPub.SupportedNetwork.Snap().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.TapJoy:
                return(new MoPub.SupportedNetwork.Tapjoy().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.UnityAds:
                return(new MoPub.SupportedNetwork.Unity().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Verizon:
                return(new MoPub.SupportedNetwork.Verizon().MediationSettingsClassName);

            case MoPubSettings.SupportedNetwork.Vungle:
                return(new MoPub.SupportedNetwork.Vungle().MediationSettingsClassName);

            default:
                return(null);
            }
        }
Example #2
0
        private static string GetAdapterConfigurationClassName(this MoPubSettings.MediatedNetwork mediatedNetwork)
        {
            if (mediatedNetwork == null)
            {
                return(null);
            }

            if (!mediatedNetwork.IsSupportedNetwork)
            {
                return(mediatedNetwork.AdapterConfigurationClassName);
            }

            switch (mediatedNetwork.SupportedNetworkName)
            {
            case MoPubSettings.SupportedNetwork.AdColony:
                return(new MoPub.SupportedNetwork.AdColony().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.AdMob:
                return(new MoPub.SupportedNetwork.AdMob().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.AppLovin:
                return(new MoPub.SupportedNetwork.AppLovin().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.Chartboost:
                return(new MoPub.SupportedNetwork.Chartboost().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.Facebook:
                return(new MoPub.SupportedNetwork.Facebook().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.IronSource:
                return(new MoPub.SupportedNetwork.IronSource().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.OnebyAOL:
                return(new MoPub.SupportedNetwork.OnebyAOL().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.TapJoy:
                return(new MoPub.SupportedNetwork.Tapjoy().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.UnityAds:
                return(new MoPub.SupportedNetwork.Unity().AdapterConfigurationClassName);

            case MoPubSettings.SupportedNetwork.Vungle:
                return(new MoPub.SupportedNetwork.Vungle().AdapterConfigurationClassName);

            default:
                return(null);
            }
        }
Example #3
0
        public static MoPubBase.MediatedNetwork ToMoPubMediatedNetwork(this MoPubSettings.MediatedNetwork mediatedNetwork)
        {
            if (mediatedNetwork == null)
            {
                return(null);
            }

            return(new MoPubBase.MediatedNetwork()
            {
                AdapterConfigurationClassName = mediatedNetwork.GetAdapterConfigurationClassName(),
                MediationSettingsClassName = mediatedNetwork.MediationSettingsClassName,
                NetworkConfiguration = mediatedNetwork.NetworkConfiguration,
                MediationSettings = StringStringDictToStringObjectDict(mediatedNetwork.MediationSettings),
                MoPubRequestOptions = mediatedNetwork.MoPubRequestOptions,
            });
        }