Skip to content

Commit f574bad

Browse files
authored
Fix latent codegen lint issues from PR 553 (#787)
1 parent 893772c commit f574bad

File tree

14 files changed

+78
-257
lines changed

14 files changed

+78
-257
lines changed

codegen/src/Azure.Iot.Operations.ProtocolCompiler/T4/communication/dotnet/Service/t4/DotNetService.tt

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ namespace <#=this.projectName#>.<#=this.genNamespace.GetTypeName(TargetLanguage.
5353
/// <param name="topicTokenMap">
5454
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
5555
/// for topic tokens such as "modelId" which should be the same for the duration of this service's lifetime. Note that
56-
/// additional topic tokens can be specified when starting the service with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/> and
57-
/// can be specified per-telemetry message.
56+
/// additional topic tokens can be specified per-telemetry message.
5857
/// </param>
5958
public Service(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
6059
{
@@ -139,20 +138,8 @@ namespace <#=this.projectName#>.<#=this.genNamespace.GetTypeName(TargetLanguage.
139138
/// <summary>
140139
/// Begin accepting command invocations for all command executors.
141140
/// </summary>
142-
/// <param name="additionalTopicTokenMap">
143-
/// The topic token replacements to use in addition to any topic tokens specified in the constructor. If this map
144-
/// contains any keys that topic tokens provided in the constructor also has, then values specified in this map will take precedence.
145-
/// </param>
146141
/// <param name="preferredDispatchConcurrency">The dispatch concurrency count for the command response cache to use.</param>
147142
/// <param name="cancellationToken">Cancellation token.</param>
148-
/// <remarks>
149-
/// Specifying custom topic tokens in <paramref name="additionalTopicTokenMap"/> allows you to make command executors only
150-
/// accept commands over a specific topic.
151-
///
152-
/// Note that a given command executor can only be started with one set of topic token replacements. If you want a command executor
153-
/// to only handle commands for several specific sets of topic token values (as opposed to all possible topic token values), then you will
154-
/// instead need to create a command executor per topic token set.
155-
/// </remarks>
156143
public async Task StartAsync(int? preferredDispatchConcurrency = null, CancellationToken cancellationToken = default)
157144
{
158145
string? clientId = this.mqttClient.ClientId;
@@ -247,8 +234,7 @@ namespace <#=this.projectName#>.<#=this.genNamespace.GetTypeName(TargetLanguage.
247234
/// <param name="mqttClient">The MQTT client to use.</param>
248235
/// <param name="topicTokenMap">
249236
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
250-
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime. Note that
251-
/// additional topic tokens can be specified when starting the client with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/>.
237+
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime.
252238
/// </param>
253239
public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
254240
{
@@ -298,6 +284,12 @@ namespace <#=this.projectName#>.<#=this.genNamespace.GetTypeName(TargetLanguage.
298284
/// <summary>
299285
/// Invoke a command.
300286
/// </summary>
287+
<# if (this.doesCommandTargetExecutor) { #>
288+
/// <param name="executorId">The identifier of the executor targeted by this command request.</param>
289+
<# } #>
290+
<# if (cmdEnvoyInfo.RequestSchema != null) { #>
291+
/// <param name="request">The data for this command request.</param>
292+
<# } #>
301293
/// <param name="requestMetadata">The metadata for this command request.</param>
302294
/// <param name="additionalTopicTokenMap">
303295
/// The topic token replacement map to use in addition to the topic tokens specified in the constructor. If this map
@@ -336,19 +328,7 @@ namespace <#=this.projectName#>.<#=this.genNamespace.GetTypeName(TargetLanguage.
336328
/// <summary>
337329
/// Begin accepting telemetry for all telemetry receivers.
338330
/// </summary>
339-
/// <param name="additionalTopicTokenMap">
340-
/// The topic token replacements to use in addition to any topic tokens specified in the constructor. If this map
341-
/// contains any keys that topic tokens provided in the constructor also has, then values specified in this map will take precedence.
342-
/// </param>
343331
/// <param name="cancellationToken">Cancellation token.</param>
344-
/// <remarks>
345-
/// Specifying custom topic tokens in <paramref name="additionalTopicTokenMap"/> allows you to make telemetry receivers only
346-
/// accept telemetry over a specific topic.
347-
///
348-
/// Note that a given telemetry receiver can only be started with one set of topic token replacements. If you want a telemetry receiver
349-
/// to only handle telemetry for several specific sets of topic token values (as opposed to all possible topic token values), then you will
350-
/// instead need to create a telemetry receiver per topic token set.
351-
/// </remarks>
352332
public async Task StartAsync(CancellationToken cancellationToken = default)
353333
{
354334
await Task.WhenAll(

dotnet/samples/Protocol/CloudEvents/Oven/Oven.g.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public abstract partial class Service : IAsyncDisposable
3333
/// <param name="topicTokenMap">
3434
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
3535
/// for topic tokens such as "modelId" which should be the same for the duration of this service's lifetime. Note that
36-
/// additional topic tokens can be specified when starting the service with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/> and
37-
/// can be specified per-telemetry message.
36+
/// additional topic tokens can be specified per-telemetry message.
3837
/// </param>
3938
public Service(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
4039
{
@@ -109,8 +108,7 @@ public abstract partial class Client
109108
/// <param name="mqttClient">The MQTT client to use.</param>
110109
/// <param name="topicTokenMap">
111110
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
112-
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime. Note that
113-
/// additional topic tokens can be specified when starting the client with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/>.
111+
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime.
114112
/// </param>
115113
public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
116114
{
@@ -134,19 +132,7 @@ public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClien
134132
/// <summary>
135133
/// Begin accepting telemetry for all telemetry receivers.
136134
/// </summary>
137-
/// <param name="additionalTopicTokenMap">
138-
/// The topic token replacements to use in addition to any topic tokens specified in the constructor. If this map
139-
/// contains any keys that topic tokens provided in the constructor also has, then values specified in this map will take precedence.
140-
/// </param>
141135
/// <param name="cancellationToken">Cancellation token.</param>
142-
/// <remarks>
143-
/// Specifying custom topic tokens in <paramref name="additionalTopicTokenMap"/> allows you to make telemetry receivers only
144-
/// accept telemetry over a specific topic.
145-
///
146-
/// Note that a given telemetry receiver can only be started with one set of topic token replacements. If you want a telemetry receiver
147-
/// to only handle telemetry for several specific sets of topic token values (as opposed to all possible topic token values), then you will
148-
/// instead need to create a telemetry receiver per topic token set.
149-
/// </remarks>
150136
public async Task StartAsync(CancellationToken cancellationToken = default)
151137
{
152138
await Task.WhenAll(

dotnet/samples/Protocol/ReadCloudEvents/Oven/Oven.g.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public abstract partial class Service : IAsyncDisposable
3333
/// <param name="topicTokenMap">
3434
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
3535
/// for topic tokens such as "modelId" which should be the same for the duration of this service's lifetime. Note that
36-
/// additional topic tokens can be specified when starting the service with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/> and
37-
/// can be specified per-telemetry message.
36+
/// additional topic tokens can be specified per-telemetry message.
3837
/// </param>
3938
public Service(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
4039
{
@@ -109,8 +108,7 @@ public abstract partial class Client
109108
/// <param name="mqttClient">The MQTT client to use.</param>
110109
/// <param name="topicTokenMap">
111110
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
112-
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime. Note that
113-
/// additional topic tokens can be specified when starting the client with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/>.
111+
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime.
114112
/// </param>
115113
public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
116114
{
@@ -134,19 +132,7 @@ public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClien
134132
/// <summary>
135133
/// Begin accepting telemetry for all telemetry receivers.
136134
/// </summary>
137-
/// <param name="additionalTopicTokenMap">
138-
/// The topic token replacements to use in addition to any topic tokens specified in the constructor. If this map
139-
/// contains any keys that topic tokens provided in the constructor also has, then values specified in this map will take precedence.
140-
/// </param>
141135
/// <param name="cancellationToken">Cancellation token.</param>
142-
/// <remarks>
143-
/// Specifying custom topic tokens in <paramref name="additionalTopicTokenMap"/> allows you to make telemetry receivers only
144-
/// accept telemetry over a specific topic.
145-
///
146-
/// Note that a given telemetry receiver can only be started with one set of topic token replacements. If you want a telemetry receiver
147-
/// to only handle telemetry for several specific sets of topic token values (as opposed to all possible topic token values), then you will
148-
/// instead need to create a telemetry receiver per topic token set.
149-
/// </remarks>
150136
public async Task StartAsync(CancellationToken cancellationToken = default)
151137
{
152138
await Task.WhenAll(

dotnet/samples/Protocol/TestEnvoys/Counter/Counter.g.cs

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public abstract partial class Service : IAsyncDisposable
3737
/// <param name="topicTokenMap">
3838
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
3939
/// for topic tokens such as "modelId" which should be the same for the duration of this service's lifetime. Note that
40-
/// additional topic tokens can be specified when starting the service with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/> and
41-
/// can be specified per-telemetry message.
40+
/// additional topic tokens can be specified per-telemetry message.
4241
/// </param>
4342
public Service(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
4443
{
@@ -113,20 +112,8 @@ public async Task SendTelemetryAsync(TelemetryCollection telemetry, OutgoingTele
113112
/// <summary>
114113
/// Begin accepting command invocations for all command executors.
115114
/// </summary>
116-
/// <param name="additionalTopicTokenMap">
117-
/// The topic token replacements to use in addition to any topic tokens specified in the constructor. If this map
118-
/// contains any keys that topic tokens provided in the constructor also has, then values specified in this map will take precedence.
119-
/// </param>
120115
/// <param name="preferredDispatchConcurrency">The dispatch concurrency count for the command response cache to use.</param>
121116
/// <param name="cancellationToken">Cancellation token.</param>
122-
/// <remarks>
123-
/// Specifying custom topic tokens in <paramref name="additionalTopicTokenMap"/> allows you to make command executors only
124-
/// accept commands over a specific topic.
125-
///
126-
/// Note that a given command executor can only be started with one set of topic token replacements. If you want a command executor
127-
/// to only handle commands for several specific sets of topic token values (as opposed to all possible topic token values), then you will
128-
/// instead need to create a command executor per topic token set.
129-
/// </remarks>
130117
public async Task StartAsync(int? preferredDispatchConcurrency = null, CancellationToken cancellationToken = default)
131118
{
132119
string? clientId = this.mqttClient.ClientId;
@@ -200,8 +187,7 @@ public abstract partial class Client : IAsyncDisposable
200187
/// <param name="mqttClient">The MQTT client to use.</param>
201188
/// <param name="topicTokenMap">
202189
/// The topic token replacement map to use for all operations by default. Generally, this will include the token values
203-
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime. Note that
204-
/// additional topic tokens can be specified when starting the client with <see cref="StartAsync(Dictionary{string, string}?, int?, CancellationToken)"/>.
190+
/// for topic tokens such as "modelId" which should be the same for the duration of this client's lifetime.
205191
/// </param>
206192
public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
207193
{
@@ -255,6 +241,7 @@ public Client(ApplicationContext applicationContext, IMqttPubSubClient mqttClien
255241
/// <summary>
256242
/// Invoke a command.
257243
/// </summary>
244+
/// <param name="executorId">The identifier of the executor targeted by this command request.</param>
258245
/// <param name="requestMetadata">The metadata for this command request.</param>
259246
/// <param name="additionalTopicTokenMap">
260247
/// The topic token replacement map to use in addition to the topic tokens specified in the constructor. If this map
@@ -289,6 +276,8 @@ public RpcCallAsync<ReadCounterResponsePayload> ReadCounterAsync(string executor
289276
/// <summary>
290277
/// Invoke a command.
291278
/// </summary>
279+
/// <param name="executorId">The identifier of the executor targeted by this command request.</param>
280+
/// <param name="request">The data for this command request.</param>
292281
/// <param name="requestMetadata">The metadata for this command request.</param>
293282
/// <param name="additionalTopicTokenMap">
294283
/// The topic token replacement map to use in addition to the topic tokens specified in the constructor. If this map
@@ -323,6 +312,7 @@ public RpcCallAsync<IncrementResponsePayload> IncrementAsync(string executorId,
323312
/// <summary>
324313
/// Invoke a command.
325314
/// </summary>
315+
/// <param name="executorId">The identifier of the executor targeted by this command request.</param>
326316
/// <param name="requestMetadata">The metadata for this command request.</param>
327317
/// <param name="additionalTopicTokenMap">
328318
/// The topic token replacement map to use in addition to the topic tokens specified in the constructor. If this map
@@ -357,19 +347,7 @@ public RpcCallAsync<EmptyJson> ResetAsync(string executorId, CommandRequestMetad
357347
/// <summary>
358348
/// Begin accepting telemetry for all telemetry receivers.
359349
/// </summary>
360-
/// <param name="additionalTopicTokenMap">
361-
/// The topic token replacements to use in addition to any topic tokens specified in the constructor. If this map
362-
/// contains any keys that topic tokens provided in the constructor also has, then values specified in this map will take precedence.
363-
/// </param>
364350
/// <param name="cancellationToken">Cancellation token.</param>
365-
/// <remarks>
366-
/// Specifying custom topic tokens in <paramref name="additionalTopicTokenMap"/> allows you to make telemetry receivers only
367-
/// accept telemetry over a specific topic.
368-
///
369-
/// Note that a given telemetry receiver can only be started with one set of topic token replacements. If you want a telemetry receiver
370-
/// to only handle telemetry for several specific sets of topic token values (as opposed to all possible topic token values), then you will
371-
/// instead need to create a telemetry receiver per topic token set.
372-
/// </remarks>
373351
public async Task StartAsync(CancellationToken cancellationToken = default)
374352
{
375353
await Task.WhenAll(

0 commit comments

Comments
 (0)