Пример #1
0
 private void SetEndpoint(string endpoint, IAzureEnvironment environment, string endpointValue)
 {
     if (!environment.IsEndpointSet(endpoint) && !string.IsNullOrEmpty(endpointValue))
     {
         environment.SetEndpoint(endpoint, endpointValue);
     }
 }
Пример #2
0
 private void SetEndpointIfBound(IAzureEnvironment newEnvironment, string endpoint, string key)
 {
     if (MyInvocation.BoundParameters.ContainsKey(key))
     {
         newEnvironment.SetEndpoint(endpoint, MyInvocation.BoundParameters[key] as string);
     }
 }
Пример #3
0
 private void SetEndpointIfProvided(IAzureEnvironment newEnvironment, string endpoint, string property)
 {
     if (!string.IsNullOrEmpty(property))
     {
         newEnvironment.SetEndpoint(endpoint, property);
     }
 }
 private void SetEndpointIfProvided(IAzureEnvironment newEnvironment, string endpoint, string property, bool trailingSlash = false)
 {
     if (!string.IsNullOrEmpty(property))
     {
         string value = property;
         if (!string.IsNullOrWhiteSpace(value) && trailingSlash)
         {
             value = value.EndsWith("/", StringComparison.OrdinalIgnoreCase) ? value : value + "/";
         }
         newEnvironment.SetEndpoint(endpoint, value);
     }
 }
        private void SetEndpointIfBound(IAzureEnvironment newEnvironment, string endpoint, string key, bool trailingSlash = false)
        {
            if (MyInvocation.BoundParameters.ContainsKey(key))
            {
                string value = MyInvocation.BoundParameters[key] as string;
                if (!string.IsNullOrWhiteSpace(value) && trailingSlash)
                {
                    value = value.EndsWith("/", StringComparison.OrdinalIgnoreCase) ? value : value + "/";
                }

                newEnvironment.SetEndpoint(endpoint, value);
            }
        }