Browse Source
refactored CombineStep.cs removed redundant ToString call (#785)
* refactored CombineStep.cs removed redundant ToString call
* refactored CombineStep.cs applied string interpolation feature
* refactored CombineStep.cs use of language feature
finitereality/replica-status-colors
sirh3e
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
5 deletions
-
src/Microsoft.Tye.Core/CombineStep.cs
|
|
@ -39,7 +39,7 @@ namespace Microsoft.Tye |
|
|
if (binding.Protocol == "http") |
|
|
if (binding.Protocol == "http") |
|
|
{ |
|
|
{ |
|
|
var port = binding.ContainerPort ?? binding.Port ?? 80; |
|
|
var port = binding.ContainerPort ?? binding.Port ?? 80; |
|
|
var urls = $"http://*{(port == 80 ? "" : (":" + port.ToString()))}"; |
|
|
var urls = $"http://*{(port == 80 ? "" : $":{port}")}"; |
|
|
project.EnvironmentVariables.Add(new EnvironmentVariableBuilder("ASPNETCORE_URLS") { Value = urls, }); |
|
|
project.EnvironmentVariables.Add(new EnvironmentVariableBuilder("ASPNETCORE_URLS") { Value = urls, }); |
|
|
project.EnvironmentVariables.Add(new EnvironmentVariableBuilder("PORT") { Value = port.ToString(CultureInfo.InvariantCulture), }); |
|
|
project.EnvironmentVariables.Add(new EnvironmentVariableBuilder("PORT") { Value = port.ToString(CultureInfo.InvariantCulture), }); |
|
|
break; |
|
|
break; |
|
|
@ -95,10 +95,7 @@ namespace Microsoft.Tye |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (binding.Protocol == null) |
|
|
binding.Protocol ??= "http"; |
|
|
{ |
|
|
|
|
|
binding.Protocol = "http"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (binding.Port == null && binding.Protocol == "http") |
|
|
if (binding.Port == null && binding.Protocol == "http") |
|
|
{ |
|
|
{ |
|
|
|