Ejemplo n.º 1
0
        public virtual void SetAdConfig(TDAdConfig config)
        {
            m_Config = config;
            m_PlatformAdHandlerState = PlatformAdHandlerState.GetAdHandlerState(config);

            m_AfDataDic.Add(DataAnalysisDefine.AF_PID, m_Config.unitID.ToString());
            m_AfDataDic.Add(DataAnalysisDefine.AF_SDK_NAME, AdsMgr.S.GetAfPlatformName(m_Config.adPlatform.ToString()));
        }
Ejemplo n.º 2
0
            public static PlatformAdHandlerState GetAdHandlerState(TDAdConfig config)
            {
                string key = string.Format("{0}-{1}", config.adPlatform, config.adType);

                if (m_StateMap == null)
                {
                    m_StateMap = new Dictionary <string, PlatformAdHandlerState>();
                }

                PlatformAdHandlerState result = null;

                if (!m_StateMap.TryGetValue(key, out result))
                {
                    result = new PlatformAdHandlerState(key);
                    m_StateMap.Add(key, result);
                }

                return(result);
            }