internal HttpTrailerField(byte[] fieldValue) : base("Trailer", (IList <byte>)fieldValue) { string @string = HttpRegex.GetString(fieldValue); Match match = HttpTrailerField._regex.Match(@string); if (!match.Success) { return; } this.SetFieldNames(MatchExtensions.GroupCapturesValues(match, "FieldName")); }
internal HttpTransferEncodingField(byte[] fieldValue) : base("Transfer-Encoding", (IList <byte>)fieldValue) { string @string = HttpRegex.GetString(fieldValue); Match match = HttpTransferEncodingField._regex.Match(@string); if (!match.Success) { return; } this.SetTransferCodings((IList <string>)Enumerable.ToArray <string>(MatchExtensions.GroupCapturesValues(match, "TransferCoding"))); }
internal HttpContentTypeField(byte[] fieldValue) : base("Content-Type", (IList <byte>)fieldValue) { string @string = HttpRegex.GetString(fieldValue); Match match = HttpContentTypeField._regex.Match(@string); if (!match.Success) { return; } this.MediaType = Enumerable.First <Capture>(Enumerable.Cast <Capture>((IEnumerable)match.Groups["MediaType"].Captures)).Value; this.MediaSubtype = Enumerable.First <Capture>(Enumerable.Cast <Capture>((IEnumerable)match.Groups["MediaSubType"].Captures)).Value; this.Parameters = new HttpFieldParameters(MatchExtensions.GroupCapturesValues(match, "ParameterName"), MatchExtensions.GroupCapturesValues(match, "ParameterValue")); }