-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRawSendOnlyEndpoint.cs
More file actions
27 lines (21 loc) · 767 Bytes
/
RawSendOnlyEndpoint.cs
File metadata and controls
27 lines (21 loc) · 767 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
26
27
using NServiceBus.Transport;
namespace BuslyCLI.Factories;
public class RawSendOnlyEndpoint
{
protected readonly TransportInfrastructure _infrastructure;
public string EndpointName { get; }
public RawSendOnlyEndpoint(TransportInfrastructure infrastructure, string endpointName)
{
_infrastructure = infrastructure;
EndpointName = endpointName;
}
public async Task Dispatch(TransportOperations outgoingMessages, TransportTransaction transaction,
CancellationToken cancellationToken = default)
{
await _infrastructure.Dispatcher.Dispatch(outgoingMessages, transaction, cancellationToken);
}
public virtual async Task ShutDownAndCleanUp()
{
await _infrastructure.Shutdown();
}
}