Skip to content

Commit afa1115

Browse files
authored
Documentation Additions (#119)
1 parent 8a43252 commit afa1115

File tree

8 files changed

+58
-16
lines changed

8 files changed

+58
-16
lines changed

Documentation/docs/how-to/allow-invalid-certs.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ var options = new HiveMQClientOptionsBuilder()
1313
var client = new HiveMQClient(options);
1414
var connectResult = await client.ConnectAsync().ConfigureAwait(false);
1515
```
16+
17+
## See Also
18+
19+
* [HiveMQClientOptionsBuilder.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/HiveMQClientOptionsBuilder.cs)
20+
* [HiveMQClientOptions.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/Options/HiveMQClientOptions.cs)
21+
* [TLS/SSL - MQTT Security Fundamentals](https://www.hivemq.com/blog/mqtt-security-fundamentals-tls-ssl/)
22+
* [HiveMQ Documentation on Security](https://docs.hivemq.com/hivemq/latest/user-guide/security.html)

Documentation/docs/how-to/client-certificates.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,11 @@ A couple tips on the above example:
191191

192192
TLS negotiation with client certificates is based on the `X509Certificate2` class. See the [official
193193
.NET documentation](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2?view=net-8.0) for more options and information.
194+
195+
## See Also
196+
197+
* [X509 Client Certificate Authentication - MQTT Security Fundamentals](https://www.hivemq.com/blog/mqtt-security-fundamentals-x509-client-certificate-authentication/)
198+
* [TLS/SSL - MQTT Security Fundamentals](https://www.hivemq.com/blog/mqtt-security-fundamentals-tls-ssl/)
199+
* [HiveMQClientOptionsBuilder.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/HiveMQClientOptionsBuilder.cs)
200+
* [HiveMQClientOptions.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/Options/HiveMQClientOptions.cs)
201+
* [Microsoft .NET Documentation: X.509](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2?view=net-8.0)

Documentation/docs/how-to/configure-logging.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configure HiveMQtt Logging
1+
# Configure Logging
22

33
The HiveMQtt package uses [NLog](https://github.com/NLog/NLog) and can be configured with a configuration file (`NLog.config`). Having this file in the same directory of your executable will configure the HiveMQtt logger to output as configured:
44

@@ -32,3 +32,7 @@ Setting `minlevel` to `Trace` will output all activity in the HiveMQtt package d
3232
2023-10-04 16:56:55.0374|TRACE|HiveMQtt.Client.HiveMQClient|OnConnAckReceivedEventLauncher
3333
2023-10-04 16:56:55.0379|TRACE|HiveMQtt.Client.HiveMQClient|AfterConnectEventLauncher
3434
```
35+
36+
## See Also
37+
38+
* [NLog](https://github.com/NLog/NLog)

Documentation/docs/how-to/connect-with-auth.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ var options = new HiveMQClientOptionsBuilder()
1414
var client = new HiveMQClient(options);
1515
var connectResult = await client.ConnectAsync().ConfigureAwait(false);
1616
```
17+
18+
## See Also
19+
20+
* [Authentication with Username and Password - MQTT Security Fundamentals](https://www.hivemq.com/blog/mqtt-security-fundamentals-authentication-username-password/)
21+
* [Advanced Authentication Mechanisms - MQTT Security Fundamentals](https://www.hivemq.com/blog/mqtt-security-fundamentals-advanced-authentication-mechanisms/)
22+
* [HiveMQ Cloud / Authentication and Authorization](https://docs.hivemq.com/hivemq-cloud/authn-authz.html)
23+
* [HiveMQClientOptionsBuilder.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/HiveMQClientOptionsBuilder.cs)
24+
* [HiveMQClientOptions.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/Options/HiveMQClientOptions.cs)

Documentation/docs/how-to/publish.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ For ease of use, you can call `PublishResult.ReasonCode()` to retrieve the appro
7272

7373
## See Also
7474

75-
* [MQTT5PublishMessage](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/MQTT5/Types/MQTT5PublishMessage.cs)
76-
* [QualityOfService](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/MQTT5/Types/QualityOfService.cs)
77-
* [PublishResult](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/Results/PublishResult.cs)
75+
* [PublishMessageBuilder.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/PublishMessageBuilder.cs)
76+
* [MQTT5PublishMessage.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/MQTT5/Types/MQTT5PublishMessage.cs)
77+
* [QualityOfService.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/MQTT5/Types/QualityOfService.cs)
78+
* [PublishResult.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/Results/PublishResult.cs)

Documentation/docs/how-to/set-lwt.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ The Last Will and Testament support of MQTT can be used to notify subscribers th
44

55
For a more in-depth explanation, see [What is MQTT Last Will and Testament (LWT)? – MQTT Essentials: Part 9](https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament/).
66

7-
8-
# LastWillAndTestament
7+
## Using LastWillAndTestament
98

109
This example instantiates the `LastWillAndTestament` in the `HiveMQClientOption` class. This is then sent to the broker in the `connect` operation.
1110

@@ -37,12 +36,11 @@ var disconnectResult = await client.DisconnectAsync(disconnectOptions).Configure
3736

3837
Because the client above disconnected with `DisconnectReasonCode.DisconnectWithWillMessage`, subscribers to the `last/will` topic will receive the Last Will and Testament message as specified above.
3938

40-
# LastWillAndTestament Builder Class
39+
## The LastWillAndTestament Builder Class
4140

42-
As an ease-of-use alternative, the HiveMQtt client offers a `LastWillAndTestamentBuilder` class to more easily define a last will and testament class.
41+
As an ease-of-use alternative, the HiveMQtt client offers a `LastWillAndTestamentBuilder` class to more easily instantiate a `LastWillAndTestament` class.
4342

4443
```csharp
45-
4644
var lwt = new LastWillAndTestamentBuilder()
4745
.WithTopic("last/will")
4846
.WithPayload("last will message")
@@ -56,13 +54,18 @@ var lwt = new LastWillAndTestamentBuilder()
5654
.WithWillDelayInterval(1)
5755
.Build();
5856

59-
// Setup & Connect the client with LWT
60-
var options = new HiveMQClientOptions
61-
{
62-
LastWillAndTestament = lwt,
63-
};
57+
// Setup & Connect the client with LWT
58+
var options = new HiveMQClientOptions
59+
{
60+
LastWillAndTestament = lwt,
61+
};
6462

65-
var client = new HiveMQClient(options);
66-
connectResult = await client.ConnectAsync().ConfigureAwait(false);
63+
var client = new HiveMQClient(options);
64+
connectResult = await client.ConnectAsync().ConfigureAwait(false);
6765
```
6866

67+
## See Also
68+
69+
* [What is MQTT Last Will and Testament (LWT)? – MQTT Essentials: Part 9](https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament/)
70+
* [LastWillAndTestamentBuilder.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/LastWillAndTestamentBuilder.cs)
71+
* [LastWillAndTestament.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/LastWillAndTestament.cs)

Documentation/docs/how-to/subscribe-multi.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ var result = await client.SubscribeAsync(options);
1414
* `result.Subscriptions` contains the list of subscriptions made with this call
1515
* `client.Subscriptions` is updated with complete list of subscriptions made up to this point
1616
* each `Subscription` object has a resulting `ReasonCode` that represents the Subscribe result in `result.Subscriptions[0].ReasonCode`
17+
18+
## See Also
19+
20+
* [TopicFilter.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/MQTT5/Types/TopicFilter.cs)
21+
* [SubscribeOptionsBuilder.cs](https://github.com/hivemq/hivemq-mqtt-client-dotnet/blob/main/Source/HiveMQtt/Client/SubscribeOptionsBuilder.cs)

Documentation/docs/how-to/wait-on-event.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ await client.DisconnectAsync().ConfigureAwait(false);
3030
await taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(5)).ConfigureAwait(false);
3131
```
3232

33+
## See Also
34+
35+
* [Lifecycle Events](/docs/events)
36+
* [Events Source](https://github.com/hivemq/hivemq-mqtt-client-dotnet/tree/main/Source/HiveMQtt/Client/Events)
37+
* [TaskCompletionSource<TResult> Class (System.Threading.Tasks)](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource-1?view=net-8.0)
38+
3339

3440

3541

0 commit comments

Comments
 (0)