-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
25 lines (23 loc) · 814 Bytes
/
Program.cs
File metadata and controls
25 lines (23 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Threading.Tasks;
using HandlerOrdering;
using NServiceBus;
class Program
{
static async Task Main()
{
Console.Title = "Samples.HandlerOrdering";
var endpointConfiguration = new EndpointConfiguration("Samples.HandlerOrdering");
endpointConfiguration.UsePersistence<LearningPersistence>();
endpointConfiguration.UseTransport<LearningTransport>();
#region config
endpointConfiguration.ApplyInterfaceHandlerOrdering();
#endregion
var endpointInstance = await Endpoint.Start(endpointConfiguration);
var myMessage = new MyMessage();
await endpointInstance.SendLocal(myMessage);
Console.WriteLine("Press any key to exit");
Console.ReadKey();
await endpointInstance.Stop();
}
}