public ProductHeaderValue(string name, string version) { HeaderUtilities.CheckValidToken(name, nameof(name)); if (!string.IsNullOrEmpty(version)) { HeaderUtilities.CheckValidToken(version, nameof(version)); _version = version; } _name = name; }
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 ViaHeaderValue(string protocolVersion, string receivedBy, string protocolName, string comment) { HeaderUtilities.CheckValidToken(protocolVersion, nameof(protocolVersion)); CheckReceivedBy(receivedBy); if (!string.IsNullOrEmpty(protocolName)) { HeaderUtilities.CheckValidToken(protocolName, nameof(protocolName)); _protocolName = protocolName; } if (!string.IsNullOrEmpty(comment)) { HeaderUtilities.CheckValidComment(comment, nameof(comment)); _comment = comment; } _protocolVersion = protocolVersion; _receivedBy = receivedBy; }
private static void CheckIsValidToken(string item) { HeaderUtilities.CheckValidToken(item, nameof(item)); }
private static void CheckNameValueFormat(string name, string value) { HeaderUtilities.CheckValidToken(name, nameof(name)); CheckValueFormat(value); }
public TransferCodingHeaderValue(string value) { HeaderUtilities.CheckValidToken(value, nameof(value)); _value = value; }
public StringWithQualityHeaderValue(string value) { HeaderUtilities.CheckValidToken(value, nameof(value)); _value = value; }
public AuthenticationHeaderValue(string scheme, string parameter) { HeaderUtilities.CheckValidToken(scheme, nameof(scheme)); _scheme = scheme; _parameter = parameter; }