From 3b328e41d3fc4ced9da6b148bcb618672afdc73b Mon Sep 17 00:00:00 2001 From: Simon Gockner Date: Tue, 11 Feb 2020 15:01:25 +0100 Subject: [PATCH] - add net.tcp --- GBase.Api/Communication/ServerProtocol.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GBase.Api/Communication/ServerProtocol.cs b/GBase.Api/Communication/ServerProtocol.cs index ab0da59..ff4d7ca 100644 --- a/GBase.Api/Communication/ServerProtocol.cs +++ b/GBase.Api/Communication/ServerProtocol.cs @@ -24,7 +24,7 @@ namespace GBase.Api.Communication case ServerProtocol.Https: return @"https://"; case ServerProtocol.Tcp: - throw new NotImplementedException(); + return @"net.tcp://"; default: throw new ArgumentOutOfRangeException(nameof(protocol), protocol, "Invalid Protocol"); } @@ -36,6 +36,8 @@ namespace GBase.Api.Communication return ServerProtocol.Http; else if (@string.Equals(@"https://") || @string.Equals("https")) return ServerProtocol.Https; + else if (@string.Equals(@"net.tcp://") || @string.Equals("net.tcp") || @string.Equals("tcp")) + return ServerProtocol.Tcp; else throw new ArgumentOutOfRangeException(nameof(@string), @string, "Invalid string."); }