コード例 #1
0
 public MockManifestService2(string client_version, string platform, DateTimeOffset contentDate, Disney.Kelowna.Common.Environment.Environment environment)
 {
     clientApiVersion = client_version;
     this.platform    = platform;
     this.contentDate = contentDate;
     this.environment = environment;
 }
コード例 #2
0
        public override void InitializeStore(string token = "")
        {
            CommerceLog("<color='magenta'>initializeStore:</color> with token" + token);
            enableListners();
            Configurator configurator = Service.Get <Configurator>();
            IDictionary <string, object> dictionaryForSystem = configurator.GetDictionaryForSystem("CSGConfig");

            csgConfig            = default(CSGConfig);
            csgConfig.SupportUrl = Service.Get <Localizer>().GetTokenTranslation("GlobalUI.Settings.SettingsURLs.cphelp");
            csgConfig.Language   = LocalizationLanguage.GetCultureLanguageString(Service.Get <Localizer>().Language);
            Dictionary <string, CommerceResourceURLsDefinition> dictionary = Service.Get <GameData>().Get <Dictionary <string, CommerceResourceURLsDefinition> >();

            Disney.Kelowna.Common.Environment.Environment developmentEnvironment = Disney.Kelowna.Common.Environment.Environment.PRODUCTION;
            if (dictionary.TryGetValue(NetworkController.GenerateNetworkServiceConfig(developmentEnvironment).CommerceResourceURLsDefinition, out var value))
            {
                csgConfig.BaseUrl        = value.BaseURL;
                csgConfig.JavascriptUrls = value.JavascriptURLs;
                csgConfig.CSSUrls        = value.CSSURLs;
            }
            string key = "windows";
            IDictionary <string, object> dictionary2 = (IDictionary <string, object>)dictionaryForSystem["PROD"];
            IDictionary <string, object> dictionary3 = (IDictionary <string, object>)dictionary2[key];
            IDictionary <string, object> dictionary4 = (IDictionary <string, object>)dictionary2["base"];

            csgConfig.DeviceType            = dictionary3["DeviceType"].ToString();
            csgConfig.DistributionChannelId = dictionary3["DistributionChannelId"].ToString();
            csgConfig.PaypalMerchantId      = dictionary4["PaypalMerchantId"].ToString();
            csgConfig.PaypalEnvironment     = dictionary4["PaypalEnvironment"].ToString();
            csgConfig.SystemId       = dictionary4["SystemId"].ToString();
            csgConfig.ServicesDomain = dictionary4["ServicesDomain"].ToString();
            csgConfig.MetadataDomain = dictionary4["MetadataDomain"].ToString();
        }
コード例 #3
0
 public ManifestService()
 {
     contentDate         = DateTimeOffset.MinValue;
     clientApiVersionStr = ContentHelper.GetClientApiVersionString();
     clientPlatform      = ContentHelper.GetPlatformString();
     serverEnvironment   = Disney.Kelowna.Common.Environment.Environment.PRODUCTION;
 }
コード例 #4
0
 public void OnGUI()
 {
     GUILayout.Space(75f);
     if (selectedEnvIndex == -1)
     {
         for (int i = 0; i < environmentValues.Length; i++)
         {
             Disney.Kelowna.Common.Environment.Environment environment = (Disney.Kelowna.Common.Environment.Environment)environmentValues.GetValue(i);
             if (environment == Disney.Kelowna.Common.Environment.Environment.QA)
             {
                 selectedEnvIndex = i;
             }
         }
         activeTests = (from test in new bool[Config.Tests.Length]
                        select true).ToArray();
     }
     if (configTimeoutCurrent > 0f && !isConfiguring)
     {
         isConfiguring         = GUILayout.Button("Configure Benchmarks", GUILayout.MinWidth(200f), GUILayout.MinHeight(100f));
         configTimeoutCurrent -= Time.deltaTime;
         GUILayout.Label($"Continuing in {configTimeoutCurrent:F1} seconds...");
     }
     else
     {
         if (!isConfiguring)
         {
             return;
         }
         Config.UserName          = makeLabelledTextField("User Name:", Config.UserName);
         Config.Password          = makeLabelledTextField("Password:"******"Done", GUILayout.MinHeight(100f)))
         {
             return;
         }
         isConfiguring        = false;
         configTimeoutCurrent = 0f;
         List <BenchmarkTest> list = new List <BenchmarkTest>();
         for (int i = 0; i < Config.Tests.Length; i++)
         {
             if (activeTests[i])
             {
                 list.Add(Config.Tests[i]);
             }
         }
         Config.Tests = list.ToArray();
     }
 }
コード例 #5
0
        public static IDictionary <string, object> GetEnvironmentConfig(Disney.Kelowna.Common.Environment.Environment environment)
        {
            Configurator configurator = Service.Get <Configurator>();
            IDictionary <string, object> dictionaryForSystem = configurator.GetDictionaryForSystem("CPRemix");
            IDictionary <string, object> dictionary          = (IDictionary <string, object>)dictionaryForSystem["environments"];

            if (!dictionary.ContainsKey(environment.ToString()))
            {
                Log.LogFatal(typeof(ConfigHelper), string.Concat("Environment: ", environment, " does not exist in ApplicationConfig.txt."));
                return(null);
            }
            return((IDictionary <string, object>)dictionary[environment.ToString()]);
        }
コード例 #6
0
 private IManifestService getManifestServiceForEnvironment()
 {
     Disney.Kelowna.Common.Environment.Environment environment = Disney.Kelowna.Common.Environment.Environment.PRODUCTION;
     return(new ManifestService());
 }