public SimpleCommandsPlugin(IDataStore dataStore, ICommandsSet commandsSet, IMainMenuItemsSet menuItemsSet) { _dataStore = dataStore; _commandsSet = commandsSet; _menuItemsSet = menuItemsSet; }
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 }); }
public SimpleCommandsMessageHandler(ICommandsSet commandsSet) { _commandsSet = commandsSet; }