URSA.Web.Http.HeaderCollection.TryParse C# (CSharp) 메소드

TryParse() 공개 정적인 메소드

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.
리턴 bool
        public static bool TryParse(string headers, out HeaderCollection headersCollection)
        {
            bool result = false;
            headersCollection = null;
            try
            {
                headersCollection = Parse(headers);
                result = true;
            }
            catch
            {
            }

            return result;
        }