提交 1afd5932 编写于 作者: C Christian Kratky

Add validations for client options builder.

上级 45c033f4
......@@ -15,6 +15,11 @@ namespace MQTTnet.Client.Options
public MqttClientOptionsBuilder WithProtocolVersion(MqttProtocolVersion value)
{
if (value == MqttProtocolVersion.Unknown)
{
throw new ArgumentException("Protocol version is invalid.");
}
_options.ProtocolVersion = value;
return this;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册