public SimpleCommandsPlugin(IDataStore dataStore,
                             ICommandsSet commandsSet, IMainMenuItemsSet menuItemsSet)
 {
     _dataStore    = dataStore;
     _commandsSet  = commandsSet;
     _menuItemsSet = menuItemsSet;
 }
Exemplo n.º 2
0
 public CommandsViewModel(ICommandsSet commandsSet)
 {
     _commandsSet = commandsSet;
     Icon         = new PackIconFontAwesome {
         Kind = PackIconFontAwesomeKind.ExclamationSolid
     };
     Label    = "Commands";
     ToolTip  = "Custom Commands";
     IsOption = false;
     Content  = new CommandsView {
         DataContext = this
     };
 }
        public GetCommandsToRun_Should()
        {
            var services = new ServiceCollection();

            services.AddSimpleCommandsPlugin();

            _commandsSet   = services.BuildServiceProvider().GetService <ICommandsSet>();
            _customCommand = new CustomCommand
            {
                CommandWord = "!ping",
                Response    = "PONG",
                Enabled     = true,
                Access      = Access.Everyone,
            };
            _commandsSet.Initialize(new List <CustomCommand> {
                _customCommand
            });
        }
Exemplo n.º 4
0
 public SimpleCommandsMessageHandler(ICommandsSet commandsSet)
 {
     _commandsSet = commandsSet;
 }