internal HttpTrailerField(byte[] fieldValue) : base(FieldName, fieldValue) { string fieldValueString = HttpRegex.GetString(fieldValue); Match match = _regex.Match(fieldValueString); if (!match.Success) { return; } SetFieldNames(match.GroupCapturesValues(FieldNameGroupName)); }
internal HttpTransferEncodingField(byte[] fieldValue) : base(FieldName, fieldValue) { string fieldValueString = HttpRegex.GetString(fieldValue); Match match = _regex.Match(fieldValueString); if (!match.Success) { return; } SetTransferCodings(match.GroupCapturesValues(RegexTransferCodingGroupName).ToArray()); }
internal HttpContentTypeField(byte[] fieldValue) : base(FieldName, fieldValue) { string fieldValueString = HttpRegex.GetString(fieldValue); Match match = _regex.Match(fieldValueString); if (!match.Success) return; MediaType = match.Groups[MediaTypeGroupName].Captures.Cast<Capture>().First().Value; MediaSubtype = match.Groups[MediaSubTypeGroupName].Captures.Cast<Capture>().First().Value; Parameters = new HttpFieldParameters(match.GroupCapturesValues(HttpRegex.ParameterNameGroupName), match.GroupCapturesValues(HttpRegex.ParameterValueGroupName)); }