Skip to content

Commit f3caa1d

Browse files
committed
swtich to if to ignopre case
1 parent 0eab6fc commit f3caa1d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AzureApplicationGatewayHttpListenerBase.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.Network.Models;
16+
using System;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.Network
@@ -107,14 +108,13 @@ public PSApplicationGatewayHttpListener NewObject()
107108
httpListener.Protocol = this.Protocol;
108109
httpListener.HostName = this.HostName;
109110

110-
switch (this.RequireServerNameIndication)
111+
if(string.Equals(this.RequireServerNameIndication,"true", StringComparison.OrdinalIgnoreCase))
111112
{
112-
case "true":
113-
httpListener.RequireServerNameIndication = true;
114-
break;
115-
case "false":
116-
httpListener.RequireServerNameIndication = false;
117-
break;
113+
httpListener.RequireServerNameIndication = true;
114+
}
115+
else if(string.Equals(this.RequireServerNameIndication, "false", StringComparison.OrdinalIgnoreCase))
116+
{
117+
httpListener.RequireServerNameIndication = false;
118118
}
119119

120120
if (!string.IsNullOrEmpty(this.FrontendIPConfigurationId))

0 commit comments

Comments
 (0)