public StringWithQualityHeaderValue(string value, double quality) { HeaderUtilities.CheckValidToken(value, nameof(value)); if ((quality < 0) || (quality > 1)) { throw new ArgumentOutOfRangeException(nameof(quality)); } _value = value; _quality = quality; }
public StringWithQualityHeaderValue(StringSegment value) { HeaderUtilities.CheckValidToken(value, nameof(value)); _value = value; }
private static void CheckNameValueFormat(StringSegment name, StringSegment value) { HeaderUtilities.CheckValidToken(name, nameof(name)); CheckValueFormat(value); }
private static void CheckIsValidToken(StringSegment item) { HeaderUtilities.CheckValidToken(item, nameof(item)); }
private static void CheckNameValueFormat(string name, string value) { HeaderUtilities.CheckValidToken(name, nameof(name)); CheckValueFormat(value); }