- add @ before server protocol strings

pull/26/head
Simon Gockner 6 years ago
parent db97feb6e1
commit 5235dcbb80
  1. 8
      GBase.Api/Communication/ServerProtocol.cs

@ -20,9 +20,9 @@ namespace GBase.Api.Communication
switch (protocol) switch (protocol)
{ {
case ServerProtocol.Http: case ServerProtocol.Http:
return "http://"; return @"http://";
case ServerProtocol.Https: case ServerProtocol.Https:
return "https://"; return @"https://";
case ServerProtocol.Tcp: case ServerProtocol.Tcp:
throw new NotImplementedException(); throw new NotImplementedException();
default: default:
@ -32,9 +32,9 @@ namespace GBase.Api.Communication
public static ServerProtocol GetServerProtocolFromString(string @string) public static ServerProtocol GetServerProtocolFromString(string @string)
{ {
if (@string.Equals("http://") || @string.Equals("http")) if (@string.Equals(@"http://") || @string.Equals("http"))
return ServerProtocol.Http; return ServerProtocol.Http;
else if (@string.Equals("https://") || @string.Equals("https")) else if (@string.Equals(@"https://") || @string.Equals("https"))
return ServerProtocol.Https; return ServerProtocol.Https;
else else
throw new ArgumentOutOfRangeException(nameof(@string), @string, "Invalid string."); throw new ArgumentOutOfRangeException(nameof(@string), @string, "Invalid string.");

Loading…
Cancel
Save