/// <summary> /// Represent a silo instance entry in the gateway URI format. /// </summary> /// <param name="gateway">The input silo instance</param> /// <returns></returns> private static Uri ConvertToGatewayUri(SiloInstanceTableEntry gateway) { int proxyPort = 0; if (!string.IsNullOrEmpty(gateway.ProxyPort)) { int.TryParse(gateway.ProxyPort, out proxyPort); } int gen = 0; if (!string.IsNullOrEmpty(gateway.Generation)) { int.TryParse(gateway.Generation, out gen); } SiloAddress address = SiloAddress.New(new IPEndPoint(IPAddress.Parse(gateway.Address), proxyPort), gen); return(address.ToGatewayUri()); }
private static Uri ConvertToGatewayUri(SiloEntity gateway) { SiloAddress address = SiloAddress.New(new IPEndPoint(IPAddress.Parse(gateway.Address), gateway.ProxyPort.Value), gateway.Generation); return(address.ToGatewayUri()); }