System.Net.Http.Headers.ProductInfoHeaderValue.Parse C# (CSharp) Method

Parse() public static method

public static Parse ( string input ) : ProductInfoHeaderValue
input string
return ProductInfoHeaderValue
        public static ProductInfoHeaderValue Parse(string input)
        {
            int index = 0;
            object result = ProductInfoHeaderParser.SingleValueParser.ParseValue(
                input, null, ref index);
            if (index < input.Length)
            {
                // There is some invalid leftover data. Normally BaseHeaderParser.TryParseValue would 
                // handle this, but ProductInfoHeaderValue does not derive from BaseHeaderParser.
                throw new FormatException(string.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input.Substring(index)));
            }
            return (ProductInfoHeaderValue)result;
        }