CK.StandardPlugins.CommandManager.CommandManager.SendCommands C# (CSharp) Method

SendCommands() public method

public SendCommands ( object sender, ICKReadOnlyList commands ) : void
sender object
commands ICKReadOnlyList
return void
        public void SendCommands( object sender, ICKReadOnlyList<string> commands )
        {
            if( _runningCommands == null ) _runningCommands = new Queue<DictionaryEntry>();
            bool isRunning = _runningCommands.Count > 0;

            foreach( string cmd in commands )
                _runningCommands.Enqueue( new DictionaryEntry( sender, cmd ) );

            if( !isRunning )
            {
                while( _runningCommands.Count > 0 )
                {
                    DictionaryEntry e = _runningCommands.Dequeue();
                    DoSendCommand( e.Key, (string)e.Value );
                }
            }
        }