Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 58daae9

Browse files
mauroakzu
authored andcommitted
Formatted changed files
1 parent 8b75fdb commit 58daae9

File tree

2 files changed

+310
-256
lines changed

2 files changed

+310
-256
lines changed

src/Client/IMqttClient.cs

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ namespace System.Net.Mqtt
77
/// </summary>
88
public interface IMqttClient : IDisposable
99
{
10-
/// <summary>
11-
/// Event raised when the Client gets disconnected.
12-
/// The Client disconnection could be caused by a protocol disconnect,
13-
/// an error or a remote disconnection produced by the Server.
14-
/// See <see cref="MqttEndpointDisconnected"/> for more details on the disconnection information
15-
/// </summary>
10+
/// <summary>
11+
/// Event raised when the Client gets disconnected.
12+
/// The Client disconnection could be caused by a protocol disconnect,
13+
/// an error or a remote disconnection produced by the Server.
14+
/// See <see cref="MqttEndpointDisconnected"/> for more details on the disconnection information
15+
/// </summary>
1616
event EventHandler<MqttEndpointDisconnected> Disconnected;
1717

18-
/// <summary>
19-
/// Id of the connected Client.
20-
/// This Id correspond to the <see cref="MqttClientCredentials.ClientId"/> parameter passed to
21-
/// <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
22-
/// </summary>
18+
/// <summary>
19+
/// Id of the connected Client.
20+
/// This Id correspond to the <see cref="MqttClientCredentials.ClientId"/> parameter passed to
21+
/// <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
22+
/// </summary>
2323
string Id { get; }
2424

25-
/// <summary>
26-
/// Indicates if the Client is connected by protocol.
27-
/// This means that a CONNECT packet has been sent,
28-
/// by calling <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
29-
/// </summary>
25+
/// <summary>
26+
/// Indicates if the Client is connected by protocol.
27+
/// This means that a CONNECT packet has been sent,
28+
/// by calling <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
29+
/// </summary>
3030
bool IsConnected { get; }
3131

3232
/// <summary>
@@ -67,7 +67,7 @@ public interface IMqttClient : IDisposable
6767
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180841">MQTT Connect</a>
6868
/// for more details about the protocol connection
6969
/// </remarks>
70-
Task<SessionState> ConnectAsync (MqttClientCredentials credentials, MqttLastWill will = null, bool cleanSession = false);
70+
Task<SessionState> ConnectAsync(MqttClientCredentials credentials, MqttLastWill will = null, bool cleanSession = false);
7171

7272
/// <summary>
7373
/// Represents the protocol connection, which consists of sending a CONNECT packet
@@ -88,7 +88,7 @@ public interface IMqttClient : IDisposable
8888
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180841">MQTT Connect</a>
8989
/// for more details about the protocol connection
9090
/// </remarks>
91-
Task<SessionState> ConnectAsync (MqttLastWill will = null);
91+
Task<SessionState> ConnectAsync(MqttLastWill will = null);
9292

9393
/// <summary>
9494
/// Represents the protocol subscription, which consists of sending a SUBSCRIBE packet
@@ -108,55 +108,55 @@ public interface IMqttClient : IDisposable
108108
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180876">MQTT Subscribe</a>
109109
/// for more details about the protocol subscription
110110
/// </remarks>
111-
Task SubscribeAsync (string topicFilter, MqttQualityOfService qos);
111+
Task SubscribeAsync(string topicFilter, MqttQualityOfService qos);
112112

113-
/// <summary>
114-
/// Represents the protocol publish, which consists of sending a PUBLISH packet
115-
/// and awaiting the corresponding ACK packet, if applies, based on the QoS defined
116-
/// </summary>
117-
/// <param name="message">
118-
/// The application message to publish to the Server.
119-
/// See <see cref="MqttApplicationMessage" /> for more details about the application messages
120-
/// </param>
121-
/// <param name="qos">
122-
/// The Quality Of Service (QoS) associated to the application message, which determines
123-
/// the sequence of acknowledgements that Client and Server should send each other to consider the message as delivered
124-
/// See <see cref="MqttQualityOfService" /> for more details about the QoS values
125-
/// </param>
126-
/// <param name="retain">
127-
/// Indicates if the application message should be retained by the Server for future subscribers.
128-
/// Only the last message of each topic is retained
129-
/// </param>
130-
/// <remarks>
131-
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180850">MQTT Publish</a>
132-
/// for more details about the protocol publish
133-
/// </remarks>
134-
Task PublishAsync (MqttApplicationMessage message, MqttQualityOfService qos, bool retain = false);
113+
/// <summary>
114+
/// Represents the protocol publish, which consists of sending a PUBLISH packet
115+
/// and awaiting the corresponding ACK packet, if applies, based on the QoS defined
116+
/// </summary>
117+
/// <param name="message">
118+
/// The application message to publish to the Server.
119+
/// See <see cref="MqttApplicationMessage" /> for more details about the application messages
120+
/// </param>
121+
/// <param name="qos">
122+
/// The Quality Of Service (QoS) associated to the application message, which determines
123+
/// the sequence of acknowledgements that Client and Server should send each other to consider the message as delivered
124+
/// See <see cref="MqttQualityOfService" /> for more details about the QoS values
125+
/// </param>
126+
/// <param name="retain">
127+
/// Indicates if the application message should be retained by the Server for future subscribers.
128+
/// Only the last message of each topic is retained
129+
/// </param>
130+
/// <remarks>
131+
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180850">MQTT Publish</a>
132+
/// for more details about the protocol publish
133+
/// </remarks>
134+
Task PublishAsync(MqttApplicationMessage message, MqttQualityOfService qos, bool retain = false);
135135

136-
/// <summary>
137-
/// Represents the protocol unsubscription, which consists of sending an UNSUBSCRIBE packet
138-
/// and awaiting the corresponding UNSUBACK packet from the Server
139-
/// </summary>
140-
/// <param name="topics">
141-
/// The list of topics to unsubscribe from
142-
/// Once the unsubscription completes, no more application messages for those topics will arrive to <see cref="MessageStream"/>
143-
/// </param>
144-
/// <exception cref="MqttClientException">MqttClientException</exception>
145-
/// <remarks>
146-
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180885">MQTT Unsubscribe</a>
147-
/// for more details about the protocol unsubscription
148-
/// </remarks>
149-
Task UnsubscribeAsync (params string[] topics);
136+
/// <summary>
137+
/// Represents the protocol unsubscription, which consists of sending an UNSUBSCRIBE packet
138+
/// and awaiting the corresponding UNSUBACK packet from the Server
139+
/// </summary>
140+
/// <param name="topics">
141+
/// The list of topics to unsubscribe from
142+
/// Once the unsubscription completes, no more application messages for those topics will arrive to <see cref="MessageStream"/>
143+
/// </param>
144+
/// <exception cref="MqttClientException">MqttClientException</exception>
145+
/// <remarks>
146+
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180885">MQTT Unsubscribe</a>
147+
/// for more details about the protocol unsubscription
148+
/// </remarks>
149+
Task UnsubscribeAsync(params string[] topics);
150150

151-
/// <summary>
152-
/// Represents the protocol disconnection, which consists of sending a DISCONNECT packet to the Server
153-
/// No acknowledgement is sent by the Server on the disconnection
154-
/// Once the client is successfully disconnected, the <see cref="Disconnected"/> event will be fired
155-
/// </summary>
156-
/// <remarks>
157-
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180903">MQTT Disconnect</a>
158-
/// for more details about the protocol disconnection
159-
/// </remarks>
160-
Task DisconnectAsync ();
151+
/// <summary>
152+
/// Represents the protocol disconnection, which consists of sending a DISCONNECT packet to the Server
153+
/// No acknowledgement is sent by the Server on the disconnection
154+
/// Once the client is successfully disconnected, the <see cref="Disconnected"/> event will be fired
155+
/// </summary>
156+
/// <remarks>
157+
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180903">MQTT Disconnect</a>
158+
/// for more details about the protocol disconnection
159+
/// </remarks>
160+
Task DisconnectAsync();
161161
}
162162
}

0 commit comments

Comments
 (0)