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