Calabonga.Commandex.Shell.Develop.Template 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet new install Calabonga.Commandex.Shell.Develop.Template::1.0.0                
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

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:

  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.

Versions history

v1.0.0-rc.17 2024-09-28

  • Engine nuget updated RC.17

v1.0.0-rc.16 2024-09-16

  • Engine nuget updated RC.16
  • IDialogResult renamed to IViewModel
  • New property Tags added to ICommandexCommand for future commands groups management (Engine)

1.0.0-rc.15 2024-09-14

  • Nugets dependencies updated
  • Restart Wizard command crash fixed.
  • NotificationDialog windows size fixed.

1.0.0-rc.13 2024-09-13

  • Nugets versions updated
  • OnSetParameter() method created for IDialogResult in the Engine
  • DialogService implementation moved into engine nuget
  • NotificationDialog implementation moved into engine nuget
  • Wizard component moved into engine nuget
  • AppSettings moved into engine nuget

1.0.0-rc.11 2024-09-11

  • Engine-nuget updated as dependency.

1.0.0-rc.10 2024-09-11

  • Nuget dependencies updated.
  • AppSettings update with parameter NugetFeedUrl moved into configuration file (.env).
  • NugetFeedUrl default feed URL is https://api.nuget.org/v3/index.json.
  • Default folder for logs set up to ../bin/{Debug|Release}/logs/* folder.
  • SettingsFinder marked as static.

1.0.0-rc.9 2024-09-07

  • Nuget dependencies updated.

1.0.0-rc.7

  • Some instructions were updated.
  • Template default name parameter added.
  • Nuget dependencies updated.

1.0.0-rc.6

  • Abstraction for configuration reader created.
  • Nuget dependencies updated.

1.0.0-rc.3

  • Wizard component added from Engine
  • Nuget dependencies updated.

1.0.0-beta.15 2024-08-14

  • Nuget dependencies updated.

1.0.0-beta.12 2024-08-07

  • SettingsFinder copied from the main Shell project.
  • Shell settings as IAppSettings injected to MainWindowViewModel.
  • commandex.env file created with default parameters.
  • Nuget dependencies updated.

1.0.0-beta.9 2024-08-05

  • Core from original Shell updated.
  • Nuget dependencies updated.
  • MainWindow updated with new welcome message (instructions).

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

1.0.0-beta.1 2024-08-01

  • First commit

Видео (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

First Release