-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCurrentTransportCommand.cs
More file actions
17 lines (14 loc) · 745 Bytes
/
CurrentTransportCommand.cs
File metadata and controls
17 lines (14 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using BuslyCLI.Config;
using Spectre.Console;
using Spectre.Console.Cli;
namespace BuslyCLI.Commands.Transport;
public class CurrentTransportCommand(IAnsiConsole console, INServiceBusConfiguration nservicebusConfiguration)
: AsyncCommand<CurrentTransportSettings>
{
protected override async Task<int> ExecuteAsync(CommandContext context, CurrentTransportSettings settings, CancellationToken cancellationToken)
{
var nsbConfiguration = await nservicebusConfiguration.GetUnValidatedConfigurationAsync(settings.Config.Path);
console.WriteLine(nsbConfiguration != null && nsbConfiguration.CurrentTransport is not null ? nsbConfiguration.CurrentTransport : "Current transport is not set.");
return 0;
}
}