in src/nms-api/Util/URISupport.cs [503:564]
private static void ParseComposite(Uri uri, CompositeData rc, String ssp)
{
String componentString;
String parms;
if (!CheckParenthesis(ssp))
{
throw new NMSException(uri.ToString() + ": Not a matching number of '(' and ')' parenthesis");
}
int p;
int intialParen = ssp.IndexOf("(");
if (intialParen >= 0)
{
rc.Host = ssp.Substring(0, intialParen);
p = rc.Host.IndexOf("/");
if (p >= 0)
{
rc.Path = rc.Host.Substring(p);
rc.Host = rc.Host.Substring(0, p);
}
p = ssp.LastIndexOf(")");
int start = intialParen + 1;
int len = p - start;
componentString = ssp.Substring(start, len);
parms = ssp.Substring(p + 1).Trim();
}
else
{
componentString = ssp;
parms = "";
}
String[] components = SplitComponents(componentString);
rc.Components = new Uri[components.Length];
for (int i = 0; i < components.Length; i++)
{
rc.Components[i] = new Uri(components[i].Trim());
}
p = parms.IndexOf("?");
if (p >= 0)
{
if (p > 0)
{
rc.Path = StripPrefix(parms.Substring(0, p), "/");
}
rc.Parameters = ParseQuery(parms.Substring(p + 1));
}
else
{
if (parms.Length > 0)
{
rc.Path = StripPrefix(parms, "/");
}
rc.Parameters = EmptyMap;
}
}