Engine and contracts library for Calabonga.Commandex. Contracts are using for developing a modules for Commandex Shell.
License
—
Deps
8
Install Size
—
Vulns
✓ 0
Published
Dec 5, 2025
$ dotnet add package Calabonga.Commandex.EngineThis is a nuget-package for modular monolith application on WPF platform with plugins as modules. Engine and contracts library for Calabonga.Commandex. Contracts are using for developing a modules for Commandex Shell.
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.ZoneCommandexCommand<TView, TViewModel> of the CommandexCommand created. This command type can be switched in the ContentControl (UIElement) named as MainZone. New IZoneManager can activate you command in the special zone in the Shell main window;Calabonga.Utils.Extensions version updatedCalabonga.Utils.Extensions version updatedCanDoNextStep and CanDoPreviousStepISizable appliedCalabonga.Utils.Extensions nuget updated:
DateTime added:
.ToJiraString() => 1d 4h 34m 23s.GetMonthStartDay() => return the first day of the month.GetMonthStartDay() => return the first day of the month.GetWeekStartDay() => return the first day of the week.GetWeekEndDay() => return the last day of the weekToast Notification implemented: Success, Information, Warning, Error. How it works? It's really easy.
INotificationManager into your ViewModel constructor:
public partial class MainWindowsViewModel : ViewModelBase, IDisposable
{
private readonly INotificationManager _notificationManager;
public MainWindowsViewModel(INotificationManager notificationManager)
{
_notificationManager = notificationManager;
}
// ... other code...
}
var errorToast = NotificationManager.CreateErrorToast("Message text", "Title");
// or
var successToast = NotificationManager.CreateSuccessToast("Message text", "Title");
// or
var warningToast = NotificationManager.CreateWarningToast("Message text", "Title");
// or
var informationToast = NotificationManager.CreateInformationToast("Message text", "Title");
_notificationManager.Show(errorToast);
// or
_notificationManager.Show(successToast);
// or
_notificationManager.Show(warningToast);
// or
_notificationManager.Show(informationToast);
Screen - All toast notifications will show on the screen outside of the application. In this case you do not do anything. This case already works "out of the box".
NotificationZone - All toast notification will show in the special control NotificationZone you should add on your XAML (VisualTree). You can do this something like shown below:
Add namespace first
xmlns:controls="clr-namespace:Calabonga.Commandex.Engine.ToastNotifications.Controls;assembly=Calabonga.Commandex.Engine"
Then add control NotificationZone with name "NotificationZone":
<controls:NotificationZone x:Name="NotificationZone" ItemsCountMax="3" Position="TopRight" />
After than you should add a NotificationZone as a parameter for Show() method:
_notificationManager.Show(errorToast, "NotificationZone");
// or
_notificationManager.Show(successToast, "NotificationZone");
// or
_notificationManager.Show(warningToast , "NotificationZone");
// or
_notificationManager.Show(informationToast, "NotificationZone");
ViewModelLocationProvider and ViewModelLocation created for Views and ViewModels binding automation. If you want to use AutoBindingViewModel on the View (XAML), something like shown below:
<UserControl x:Class="Commandex.MyDemoCommand.Views.MyDemoView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Commandex.MyDemoCommand.Views"
xmlns:viewModels="clr-namespace:Commandex.MyDemoCommand.ViewModels"
+ xmlns:viewModelLocator="clr-namespace:Calabonga.Commandex.Engine.ViewModelLocator;assembly=Calabonga.Commandex.Engine"
+ viewModelLocator:ViewModelLocator.AutoBindingViewModel="True"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
Than you should initialize ViewModelLocationProvider in your Shell project in the Composition Root of your Application. For example:
var buildServiceProvider = services.BuildServiceProvider();
ViewModelLocationProvider.SetDefaultViewModelFactory(type => buildServiceProvider.GetRequiredService(type));
return buildServiceProvider;
You should also follow the naming rules for Views and ViewModels (or create your own overrides). What's the rule? Everything is simple. For example, if your have a view with name PersonProfileView.xaml than you should create a ViewModel for it with name PersonProfileViewModel.
IsMaximizedICommandexIdentity abstraction added for user managing. This abstraction help to create an application user and store it on the Shell. Please see Wiki samples.ISecureData abstraction added for availability to store on the Shell side data about tokens (access_token, refresh_token).IIdentityManager abstraction for dependency injection container. This can help to make availdable a logged user on the Shell for commands (plugins/modules).The result for ConfirmationDialog as Func result added (delegate). Now you can use async/await for confirmation.
New feature implemented ConfirmationDialog. Now you can ask your user some confirmations:
[RelayCommand]
private void OpenLogsFolder()
=> _dialogService.ShowConfirmation("Open logs folder?", result =>
{
if (result.ConfirmResult != ConfirmationType.Ok)
{
return;
}
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
if (!Path.Exists(path))
{
_dialogService.ShowNotification($"Folder not found: {path}");
return;
}
Process.Start(new ProcessStartInfo
{
FileName = path,
UseShellExecute = true,
Verb = "open"
});
}, ConfirmationTypes.OkCancel);
SettingsPath parameter was created to allow you to store the command's settings env-files in a separate folderServiceCollection extension created for DefaultResultProcessor registration in containerIResultProcessor interface created as abstraction for pipeline processingParameterCommandexCommand getting parameter and setting parameter refactored. Property Parameter removed. For read data you can use ReadParameter() method. And for write - WriteParameter().IDialogResult renamed to IViewModelTags added to ICommandexCommand for future commands groups managementActiveStep on Wizard dialog.OnSetParameter() method created for IDialogResultDialogService implementation moved into engine nugetNotificationDialog implementation moved into engine nugetWizard component moved into engine nugetAppSettings moved into engine nugetShoeDialog() added override with special parameter for ViewModelРеализован новый тип команды Wizard для Commandex. Теперь можно формировать набор шагов, которые проходит команда при в выполнении.
Обновлен также Shell для Developer, чтобы иметь возможность запускать новый тип команд.
Window при отображении модального окна.В основном репозитории Calabonga.Commandex.Shell есть несколько видео с инструкциями и разъяснениями, как использовать Commandex. А также видео о том, какие типы команд существуют и как для Commandex создавать команды разных типов.