19 namespace Deveel.Data.Protocol {
22 if (String.IsNullOrEmpty(protocol))
23 throw new ArgumentNullException(
"protocol");
24 if (String.IsNullOrEmpty(address))
25 throw new ArgumentNullException(
"address");
31 public string Protocol {
get;
private set; }
33 public string Address {
get;
private set; }
38 if (String.IsNullOrEmpty(s))
39 throw new ArgumentNullException(
"s");
41 var index = s.IndexOf(
':');
43 throw new FormatException();
45 var protocol = s.Substring(0, index).Trim();
46 var address = s.Substring(index + 1).Trim();
48 if (String.IsNullOrEmpty(protocol))
49 throw new FormatException();
51 if (String.IsNullOrEmpty(address))
52 throw new FormatException();
ConnectionEndPoint(string protocol, string address)
static ConnectionEndPoint Parse(string s)