Calabonga.Commandex.Shell.Develop.Template 1.4.2

dotnet new install Calabonga.Commandex.Shell.Develop.Template::1.4.2                
This package contains a .NET Template Package you can call from the shell/command line.

Calabonga.Commandex.Shell.Develop

Description

This 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...

What is Calabonga.Commandex

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:

  • Find a modules .dll (plugins) in the folder you set up.
  • Launch or execute modules .dll (plughis) from GUI.
  • Get the results of the module's (plugis) work after they completed.

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). Which 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.
  • Calabonga.Commandex.Engine.Processors → Results Processors for Calabonga.Commandex.Shell commands execution results. This is an extended version of the just show string in the notification dialog.

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:

  1. Please implement a ICommandexCommand interface in WPF Class Library project and add reference to Calabonga.Commandex.Shell.Develop.

  2. 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();
    }
    
  3. 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;
        }
    }
    
  4. Use your injected instance in ExecuteAsync() method to execute command as shown above.

  5. If you everything do correctly, than after button click on the form your command will come executed.

Screenshot

image

Ingredients

WPF, MVVM, CommunityToolkit, AppDefinitions, etc.

Видео (Video)

В основном репозитории Calabonga.Commandex.Shell есть несколько видео с инструкциями и разъяснениями, как использовать Commandex. А также видео о том, какие типы команд существуют и как для Commandex создавать команды разных типов.

  • 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

Engine nuget bump