Пример #1
0
        public ProductHeaderValue(string name, string version)
        {
            HeaderUtilities.CheckValidToken(name, "name");

            if (!string.IsNullOrEmpty(version))
            {
                HeaderUtilities.CheckValidToken(version, "version");
                _version = version;
            }

            _name = name;
        }
Пример #2
0
        public ViaHeaderValue(string protocolVersion, string receivedBy, string protocolName, string comment)
        {
            HeaderUtilities.CheckValidToken(protocolVersion, "protocolVersion");
            CheckReceivedBy(receivedBy);

            if (!string.IsNullOrEmpty(protocolName))
            {
                HeaderUtilities.CheckValidToken(protocolName, "protocolName");
                _protocolName = protocolName;
            }

            if (!string.IsNullOrEmpty(comment))
            {
                HeaderUtilities.CheckValidComment(comment, "comment");
                _comment = comment;
            }

            _protocolVersion = protocolVersion;
            _receivedBy      = receivedBy;
        }
Пример #3
0
        public StringWithQualityHeaderValue(string value)
        {
            HeaderUtilities.CheckValidToken(value, "value");

            _value = value;
        }
Пример #4
0
 private static void CheckIsValidToken(string item)
 {
     HeaderUtilities.CheckValidToken(item, "item");
 }
Пример #5
0
 public AuthenticationHeaderValue(string scheme, string parameter)
 {
     HeaderUtilities.CheckValidToken(scheme, "scheme");
     _scheme    = scheme;
     _parameter = parameter;
 }
Пример #6
0
 private static void CheckNameValueFormat(string name, string value)
 {
     HeaderUtilities.CheckValidToken(name, "name");
     CheckValueFormat(value);
 }
Пример #7
0
 public TransferCodingHeaderValue(string value)
 {
     HeaderUtilities.CheckValidToken(value, "value");
     _value = value;
 }