URSA.Web.Http.HeaderCollection.TryParse C# (CSharp) Method

TryParse() public static method

Tries to parse a given string as a HeaderCollection.
public static TryParse ( string headers, HeaderCollection &headersCollection ) : bool
headers string String to be parsed.
headersCollection HeaderCollection Resulting collection of headers if parsing was successful; otherwise null.
return bool
        public static bool TryParse(string headers, out HeaderCollection headersCollection)
        {
            bool result = false;
            headersCollection = null;
            try
            {
                headersCollection = Parse(headers);
                result = true;
            }
            catch
            {
            }

            return result;
        }