Apache.NMS.Util.URISupport.CreateCompatibleUri C# (CSharp) Method

CreateCompatibleUri() public static method

Given a string that could be a Composite Uri that uses syntax not compatible with the .NET Uri class such as an ActiveMQ failover Uri formatted as "failover://(tcp://localhost:61616)", the initial '://' must be changed to ':(' so that the Uri class doesn't attempt to parse the '(tcp:' as the Uri's Authority as that is not a valid host name.
public static CreateCompatibleUri ( string uriString ) : Uri
uriString string /// A string that could be a Composite Uri that uses syntax not compatible /// with the .NET Uri class ///
return System.Uri
        public static Uri CreateCompatibleUri(string uriString)
        {
            string sanitized = uriString.Replace("://(", ":(");
            return new Uri(sanitized);
        }