|
|
|
@ -29,5 +29,15 @@ namespace GBase.Server |
|
|
|
throw new ArgumentOutOfRangeException(nameof(protocol), protocol, "Invalid Protocol"); |
|
|
|
throw new ArgumentOutOfRangeException(nameof(protocol), protocol, "Invalid Protocol"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ServerProtocol GetServerProtocolFromString(string @string) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (@string.Equals("http://") || @string.Equals("http")) |
|
|
|
|
|
|
|
return ServerProtocol.Http; |
|
|
|
|
|
|
|
else if (@string.Equals("https://") || @string.Equals("https")) |
|
|
|
|
|
|
|
return ServerProtocol.Https; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(@string), @string, "Invalid string."); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |