Developer version of the Calabonga.Commandex. Witch is created to runs commands of any type for any purposes. For example, to execute a stored procedure or just to copy some files to some destinations
$ dotnet add package Calabonga.Commandex.Shell.Develop.TemplateThis is a nuget-package Calabonga.Commandex.Shell.Develop.Template (tools) that install to your Visual Studio a new type of the project. New type project can create a Developer version of the Command Executer (Calabonga.Commandex). Witch is created to runs commands of any type for any purposes. For example, to execute a stored procedure or just to copy some files to some destination. And so on...
The Calabonga.Commandex - This is an application on WPF-platform built with CommunityToolkit.MVVM for modules (plugins) using: launch and execute.
What is the Calabonga.Commandex can:
.dll (plugins) in the folder you set up..dll (plughis) from GUI.It's a complex solution with a few repositories:
Tool Template) This is a Developer version of the Command Executer Shell (Calabonga.Commandex). Which is created to runs commands of any type for any purposes. For example, to execute a stored procedure or just to co…Tool Template) This is a template of the project to create a Command for Commandex. Just install this nuget as a template for Visual Studio (Rider or dotnet CLI) and then you can create a DialogCommand faster.Nothing is simpler then install this template. Just execute command in powershell:
dotnet new install Calabonga.Commandex.Shell.Develop.Template
This application can only test your Command for Commandex, but almost in a real conditions. How? Please do a few simple steps:
Please implement a ICommandexCommand interface in WPF Class Library project and add reference to Calabonga.Commandex.Shell.Develop.
Register your ICommandexCommand implementation in the DependencyContainer.cs.
internal static IServiceProvider ConfigureServices()
{
var services = new ServiceCollection();
services.AddLogging(options =>
{
options.AddSerilog(dispose: true);
options.AddDebug();
});
services.AddSingleton<DefaultDialogView>();
services.AddSingleton<MainWindow>();
services.AddSingleton<ViewModels.MainWindowsViewModel>();
services.AddSingleton<IDialogService, DialogService>();
services.AddSingleton<IAppSettings>(_ => App.Current.Settings);
services.AddSingleton<ISettingsReaderConfiguration, DefaultSettingsReaderConfiguration>();
// dialogs and wizard
services.AddTransient<IWizardView, Wizard>();
services.AddTransient<IDialogService, DialogService>();
services.AddTransient(typeof(IWizardManager<>), typeof(WizardManager<>));
// --------------------------------------------------
// 1. Attach command definition from your project where Commandex.Command implemented.
// 2. Then uncomment line below and add your command type.
// services.AddDefinitions(typeof(WelcomeAppDefinition)); // <-- uncomment line and register your command here
// --------------------------------------------------
return services.BuildServiceProvider();
}
Inject your command implementation into MainWindowsViewModel as ICommandexCommand.
public partial class MainWindowsViewModel : ViewModelBase
{
private readonly IDialogService _dialogService;
public MainWindowsViewModel(IDialogService dialogService, IAppSettings settings)
{
Title = $"Commandex Shell Emulator for Easy developing ({settings.CommandsPath})";
Version = "1.0.0-rc.7";
_dialogService = dialogService;
}
[ObservableProperty]
private string _version;
/// <summary>
/// Executes MVVM button action
/// </summary>
[RelayCommand]
private Task ExecuteAsync()
{
_dialogService.ShowNotification("You do not attach your ICommandexCommand yet. " +
"Please add your component definition in the DependencyContainer.cs file.");
return Task.CompletedTask;
}
}
Use your injected instance in ExecuteAsync() method to execute command as shown above.
If you everything do correctly, than after button click on the form your command will come executed.
v2.8.1
v1.0.0
WPF, MVVM, CommunityToolkit, AppDefinitions, etc.
В основном репозитории Calabonga.Commandex.Shell есть несколько видео с инструкциями и разъяснениями, как использовать Commandex. А также видео о том, какие типы команд существуют и как для Commandex создавать команды разных типов.