public PublishVariableHeader(EncodedString topicName) { if (topicName.Value.Contains("+") || topicName.Value.Contains("#")) { throw new ArgumentException("Topic names cannot contain wildcard characters in Publish messages"); } if (topicName.Value.StartsWith("$")) { throw new ArgumentException("Client topic names cannot start with a $. Only server message topics can start with $"); } TopicName = topicName; }
public ConnectPayload(EncodedString clientID, Will w = null, Authentication auth = null) { _clientID = clientID; _w = w; _auth = auth; }