public static bool TryParse(string input, out ProductInfoHeaderValue parsedValue)
{
int index = 0;
object output;
parsedValue = null;
if (ProductInfoHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out output))
{
if (index < input.Length)
{
// There is some invalid leftover data. Normally BaseHeaderParser.TryParseValue would
// handle this, but ProductInfoHeaderValue does not derive from BaseHeaderParser.
return false;
}
parsedValue = (ProductInfoHeaderValue)output;
return true;
}
return false;
}