Catel.MVVM.CommandManager.IsCommandCreated C# (CSharp) Method

IsCommandCreated() public method

Determines whether the specified command name is created.
The is null or whitespace.
public IsCommandCreated ( string commandName ) : bool
commandName string Name of the command.
return bool
        public bool IsCommandCreated(string commandName)
        {
            Argument.IsNotNullOrWhitespace("commandName", commandName);

            lock (_lockObject)
            {
                return _commands.ContainsKey(commandName);
            }
        }

Usage Example

Exemplo n.º 1
0
            public void ReturnsTrueForCreatedCommand()
            {
                var commandManager = new CommandManager();

                commandManager.CreateCommand("MyCommand");

                Assert.IsTrue(commandManager.IsCommandCreated("MyCommand"));
            }
All Usage Examples Of Catel.MVVM.CommandManager::IsCommandCreated