Skip to content

Commit 2494da5

Browse files
Refactor in line with latest language provisions
Co-authored-by: Mauro Servienti <[email protected]>
1 parent f61e7ec commit 2494da5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
using NServiceBus;
22

3-
public class MyMessage :
4-
IMessage
5-
{
6-
}
3+
public class MyMessage : IMessage;

samples/logging/default/Core_10/Sample/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
// Default log level is Info
1919
defaultFactory.Level(NServiceBus.Logging.LogLevel.Debug);
20-
21-
var endpointConfiguration = new EndpointConfiguration("Samples.Logging.Default");
2220
#endregion
21+
22+
var endpointConfiguration = new EndpointConfiguration("Samples.Logging.Default");
2323

2424
endpointConfiguration.UseSerialization<SystemJsonSerializer>();
2525
endpointConfiguration.UseTransport<LearningTransport>();
@@ -32,8 +32,7 @@
3232

3333
var endpointInstance = host.Services.GetRequiredService<IMessageSession>();
3434

35-
var myMessage = new MyMessage();
36-
await endpointInstance.SendLocal(myMessage);
35+
await endpointInstance.SendLocal(new MyMessage());
3736

3837
Console.WriteLine("Press any key to exit");
3938
Console.ReadKey();

0 commit comments

Comments
 (0)