Calabonga.Commandex.Shell.Develop.Template
1.0.0-beta.5
See the version list below for details.
dotnet new install Calabonga.Commandex.Shell.Develop.Template::1.0.0-beta.5
Calabonga.Commandex.Shell.Develop
Description
This is 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...
What is Calabonga.Commandex
It's a complex solution with a few repositories:
Calabonga.Commandex.Shell → Command Executer or Command Launcher. To run commands of any type for any purpose. For example, to execute a stored procedure or just to copy some files to some destination.
Calabonga.Commandex.Commands → Commands for Calabonga.Commandex.Shell that can execute them from unified shell.
Calabonga.Commandex.Shell.Develop.Template → This is 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 co…Calabonga.Commandex.Engine → Engine and contracts library for Calabonga.Commandex. Contracts are using for developing a modules for Commandex Shell.
How to install template
Nothing is simpler then install this template. Just execute command in powershell
:
dotnet new install Calabonga.Commandex.Shell.Develop.Template
How to use
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 toCalabonga.Commandex.Shell.Develop
.Register your
ICommandexCommand
implementation in theDependencyContainer.cs
.internal static class DependencyContainer { /// <summary> /// Executes some registrations for Commandex. You can use this register your CommandexCommand for testing /// </summary> /// <returns></returns> internal static IServiceProvider ConfigureServices() { var services = new ServiceCollection(); services.AddLogging(options => { options.AddSerilog(dispose: true); options.AddDebug(); }); services.AddSingleton(typeof(DefaultDialogResult<>)); services.AddSingleton<DefaultDialogView>(); services.AddSingleton<MainWindow>(); services.AddSingleton<MainWindowsViewModel>(); services.AddSingleton<IDialogService, DialogService>(); // -------------------------------------------------- // Attach your definition from your project with your // Commandex.Command implementation, uncomment line below and add your command type. // services.AddDefinitions(typeof(YourCommandDefinition)); // -------------------------------------------------- return services.BuildServiceProvider(); } }
Inject your command implementation into
MainWindowsViewModel
asICommandexCommand
.public partial class MainWindowsViewModel : ViewModelBase { private readonly ICommandexCommand _command; // ← create private field public MainWindowsViewModel(ICommandexCommand command) // ← inject base interface { _command = command; // ← do not forget this Title = $"Commandex Shell Developer Emulator"; } [RelayCommand] private Task ExecuteAsync() { _command.ShowDialogAsync(); // ← show command dialog 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.
Screenshot
Pic1. Main window content.
Ingredients
WPF, MVVM, CommunityToolkit, etc.
Versions history
v1.0.0-beta.5 2024-08-01
GitInfo
nuget package removed because throwing error when git not used.- Readme.md updated with screenshot and som code snippets.
v1.0.0-beta.1 2024-08-01
- First commit
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.4.2 | 67 | 11/12/2024 |
1.4.1 | 77 | 11/1/2024 |
1.3.0 | 85 | 10/12/2024 |
1.2.0 | 78 | 10/9/2024 |
1.0.0 | 82 | 9/30/2024 |
1.0.0-rc.17 | 53 | 9/28/2024 |
1.0.0-rc.16 | 79 | 9/16/2024 |
1.0.0-rc.15 | 59 | 9/14/2024 |
1.0.0-rc.13 | 60 | 9/13/2024 |
1.0.0-rc.11 | 55 | 9/11/2024 |
1.0.0-rc.10 | 53 | 9/11/2024 |
1.0.0-rc.9 | 62 | 9/7/2024 |
1.0.0-rc.7 | 54 | 9/5/2024 |
1.0.0-rc.6 | 56 | 9/4/2024 |
1.0.0-rc.5 | 79 | 8/20/2024 |
1.0.0-rc.4 | 76 | 8/16/2024 |
1.0.0-rc.3 | 76 | 8/15/2024 |
1.0.0-beta.15 | 66 | 8/8/2024 |
1.0.0-beta.12 | 53 | 8/7/2024 |
1.0.0-beta.11 | 35 | 8/5/2024 |
1.0.0-beta.9 | 30 | 8/5/2024 |
1.0.0-beta.8 | 36 | 8/4/2024 |
1.0.0-beta.7 | 37 | 8/2/2024 |
1.0.0-beta.6 | 33 | 8/2/2024 |
1.0.0-beta.5 | 43 | 8/1/2024 |
1.0.0-beta.2 | 46 | 8/1/2024 |
1.0.0-beta.1 | 46 | 8/1/2024 |
Git Info nuget package removed because throwing error when git not used