Example #1
0
        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;
        }
 public ProductInfoHeaderValue(string comment)
 {
     HeaderUtilities.CheckValidComment(comment, nameof(comment));
     _comment = comment;
 }