예제 #1
0
        /// <summary>
        /// Adds a behavior to the <see cref="All"/> collection and the collection
        /// based on the <see cref="ParseCommandBase.CommandType"/> type.
        /// </summary>
        /// <param name="command"></param>
        public void AddSafe(ParseCommandBase command)
        {
            switch (command.CommandType)
            {
            case CommandTypes.Foreground:
                Foreground.Push(command);
                All.Push(command);
                break;

            case CommandTypes.Background:
                Background.Push(command);
                All.Push(command);
                break;

            case CommandTypes.Mirror:
                Mirror.Push(command);
                All.Push(command);
                break;

            case CommandTypes.Effect:
                Effect.Push(command);
                All.Push(command);
                break;

            case CommandTypes.Glyph:
                Glyph.Push(command);
                All.Push(command);
                break;

            default:
                break;
            }
        }