Exemplo n.º 1
0
 public void Validate(string paramName)
 {
     if (Environment != null && !DefinedEnvironments.HasEnvironment(Environment))
     {
         var known = string.Join(", ", DefinedEnvironments.Environments.Select(it => it.Name));
         throw new SemanticArgumentException($"environment {Environment} is not a known environment. Known environments are {known}", paramName);
     }
 }
Exemplo n.º 2
0
        public WithEnvironment(string environment)
        {
            Environment = environment;

            var e = DefinedEnvironments.GetEnvironment(environment);

            if (e != null)
            {
                FhirBaseUrl      = e.FhirBaseUrl.AppendCharToEndOfStringIfMissing('/');
                ProxyBaseUrl     = e.ProxyBaseUrl.AppendCharToEndOfStringIfMissing('/');
                AuthorizationUrl = e.AuthorizationUrl.AppendCharToEndOfStringIfMissing('/');
            }
        }