Skip to content

Commit 0cf7d02

Browse files
Simplify empty SomeCommand class and getters
Co-authored-by: Mauro Servienti <[email protected]>
1 parent 44a1de1 commit 0cf7d02

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

samples/logging/new-relic/Metrics_6/Endpoint/LoadSimulator.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ TimeSpan NextDelay()
4242
return delay;
4343
}
4444

45-
Task Work()
46-
{
47-
return endpointInstance.SendLocal(new SomeCommand());
48-
}
45+
Task Work() => endpointInstance.SendLocal(new SomeCommand());
4946

5047
public Task Stop()
5148
{

samples/logging/new-relic/Metrics_6/Endpoint/NewRelicMetrics.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ static void RegisterProbes(ProbeContext context, string endpointName, Dictionary
6969
#endregion
7070
}
7171

72-
static string FormatMetric(string name, string prefix)
73-
{
74-
return Normalize($"Custom/NServiceBus/{prefix}/{{0}}/{name}");
75-
}
72+
static string FormatMetric(string name, string prefix) => Normalize($"Custom/NServiceBus/{prefix}/{{0}}/{name}");
7673

7774
static string Normalize(string name)
7875
{
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
using NServiceBus;
22

3-
class SomeCommand :
4-
ICommand
5-
{
6-
}
3+
class SomeCommand : ICommand;

0 commit comments

Comments
 (0)