- add net.tcp

pull/26/head
Simon Gockner 6 years ago
parent b7152a502c
commit 3b328e41d3
  1. 4
      GBase.Api/Communication/ServerProtocol.cs

@ -24,7 +24,7 @@ namespace GBase.Api.Communication
case ServerProtocol.Https: case ServerProtocol.Https:
return @"https://"; return @"https://";
case ServerProtocol.Tcp: case ServerProtocol.Tcp:
throw new NotImplementedException(); return @"net.tcp://";
default: default:
throw new ArgumentOutOfRangeException(nameof(protocol), protocol, "Invalid Protocol"); throw new ArgumentOutOfRangeException(nameof(protocol), protocol, "Invalid Protocol");
} }
@ -36,6 +36,8 @@ namespace GBase.Api.Communication
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 if (@string.Equals(@"net.tcp://") || @string.Equals("net.tcp") || @string.Equals("tcp"))
return ServerProtocol.Tcp;
else else
throw new ArgumentOutOfRangeException(nameof(@string), @string, "Invalid string."); throw new ArgumentOutOfRangeException(nameof(@string), @string, "Invalid string.");
} }

Loading…
Cancel
Save