bool ParseParameters(ref string sBodyStruct,
ArrayList asParams)
{
// remove any spaces at the beginning and the end
sBodyStruct = sBodyStruct.Trim();
// check if this is NIL
if (IsNilString(ref sBodyStruct))
return true;
// remove the opening paranthesis
if (!FindAndRemove(ref sBodyStruct, '('))
return false;
string sName = "";
string sValue = "";
while (sBodyStruct[0] != ')')
{
// Name
if (!ParseQuotedString( ref sBodyStruct, ref sName ))
{
Log(LogTypeEnum.ERROR, "Invalid Body Parameter Name.");
return false;
}
// Value
if (!ParseQuotedString(ref sBodyStruct, ref sValue ))
{
Log ( LogTypeEnum.ERROR, "Invalid Body Parameter Value.");
return false;
}
asParams.Add(sName);
asParams.Add(sValue);
}
// remove the closing paranthesis
return FindAndRemove(ref sBodyStruct, ')');
}