Beispiel #1
0
 private void assignEnvironmentsFromConfig()
 {
     Environments = new List <DropDownItem>();
     foreach (ApiEnvironment apiEnvironment in EcClientConfiguration.GetConfig().ApiEnvironmentCollection)
     {
         Environments.Add(new DropDownItem(apiEnvironment.Name, apiEnvironment.Environment));
     }
 }
Beispiel #2
0
        private Tuple <string, string, int, bool?> GetHostForEnvironment(string environment)
        {
            UriBuilder builder = new UriBuilder();

            builder.Host = "localhost";
            bool?useTestMode = null;

            foreach (EnvironmentUrl eu in EcClientConfiguration.GetConfig().EnvironmentUrlCollection)
            {
                if (eu.Name == environment)
                {
                    builder     = new UriBuilder(eu.Environment);
                    useTestMode = eu.UseTestMode;
                    break;
                }
            }
            return(new Tuple <string, string, int, bool?>(builder.Scheme, builder.Host, builder.Port, useTestMode));
        }
 public virtual List <string> GetEndPoints()
 {
     return((from EnvironmentUrl eu in EcClientConfiguration.GetConfig().EnvironmentUrlCollection where !eu.IgnoreInWcf.HasValue || !eu.IgnoreInWcf.Value select eu.Name).ToList());
 }