コード例 #1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            AdConfigurer.Startup(new PlatformImpl());
            PlatformVariableTest.Test1();

            /*AdListenerImplementation adListenerImplementation = new AdListenerImplementation();
             *          ImageTextureAd adClient = new ImageTextureAd (adListenerImplementation, "asdfadfd");
             *          adClient.LoadAds (2);
             * //AnalyticsWebManagerTest.Test1();*/
            PlatformObjectsFactoryHolder.SetFactory(new PlatformObjectsFactoryUnity());
            AdListenerImplementation adListener = new AdListenerImplementation();
            ImageTextureAdUnit       adUnit     = new ImageTextureAdUnit(adListener, "adsfd");

            adUnit.LoadAds(2);
            SystemInfoTest.TestHardwareInfo();
            //AnalyticsWebManagerTest.Test1();
            AdConfigurer.Shutdown();
            Console.ReadLine();
        }
コード例 #2
0
 public static void RegisterImageTextureAdUnit(ImageTextureAdInstanceUnity instance, int nDistinctAds)
 {
     if (adInstances [instance.GetAdInstanceId()] == null)
     {
         adInstances.Add(instance.GetAdInstanceId(), instance);
         if (instancesByUnits[instance.GetAdUnitId()] == null)
         {
             instancesByUnits.Add(instance.GetAdUnitId(), new ArrayList());
         }
         ((ArrayList)instancesByUnits[instance.GetAdUnitId()]).Add(instance.GetAdInstanceId());
     }
     else                 //duplicate adinstanceid
     {
     }
     if (adUnits [instance.GetAdUnitId()] == null)
     {
         ImageTextureAdUnitListener listener = new ImageTextureAdUnitListener();
         ImageTextureAdUnit         adUnit   = new ImageTextureAdUnit(listener, instance.GetAdUnitId());
         adUnits.Add(instance.GetAdUnitId(), adUnit);
         adUnit.LoadAds(nDistinctAds);
     }
 }