Scalien.ConfigStateHelpers.GetEndpointWithPort C# (CSharp) Method

GetEndpointWithPort() public static method

public static GetEndpointWithPort ( string endpoint, uint port ) : string
endpoint string
port uint
return string
        public static string GetEndpointWithPort(string endpoint, uint port)
        {
            int lastIndex = endpoint.LastIndexOf(":");
            if (lastIndex < 0)
                throw new ArgumentException("Bad endpoint: " + endpoint);
            return endpoint.Substring(0, lastIndex + 1) + port;
        }