private WarningHeaderValue(WarningHeaderValue source)
 {
     this.code = source.code;
     this.agent = source.agent;
     this.text = source.text;
     this.date = source.date;
 }
 internal static int GetWarningLength(string input, int startIndex, out object parsedValue)
 {
     int num;
     string str;
     parsedValue = null;
     if (string.IsNullOrEmpty(input) || (startIndex >= input.Length))
     {
         return 0;
     }
     int current = startIndex;
     if (!TryReadCode(input, ref current, out num))
     {
         return 0;
     }
     if (!TryReadAgent(input, current, ref current, out str))
     {
         return 0;
     }
     int length = 0;
     int num4 = current;
     if (HttpRuleParser.GetQuotedStringLength(input, current, out length) != HttpParseResult.Parsed)
     {
         return 0;
     }
     current += length;
     DateTimeOffset? date = null;
     if (!TryReadDate(input, ref current, out date))
     {
         return 0;
     }
     WarningHeaderValue value2 = new WarningHeaderValue {
         code = num,
         agent = str,
         text = input.Substring(num4, length),
         date = date
     };
     parsedValue = value2;
     return (current - startIndex);
 }
 /// <summary>Determines whether a string is valid <see cref="T:NMasters.Silverlight.Net.Http.Headers.WarningHeaderValue" /> information.</summary>
 /// <returns>Returns <see cref="T:System.Boolean" />.true if <paramref name="input" /> is valid <see cref="T:NMasters.Silverlight.Net.Http.Headers.WarningHeaderValue" /> information; otherwise, false.</returns>
 /// <param name="input">The string to validate.</param>
 /// <param name="parsedValue">The <see cref="T:NMasters.Silverlight.Net.Http.Headers.WarningHeaderValue" /> version of the string.</param>
 public static bool TryParse(string input, out WarningHeaderValue parsedValue)
 {
     object obj2;
     int index = 0;
     parsedValue = null;
     if (GenericHeaderParser.SingleValueWarningParser.TryParseValue(input, null, ref index, out obj2))
     {
         parsedValue = (WarningHeaderValue) obj2;
         return true;
     }
     return false;
 }