Example #1
0
        protected virtual void OnInsert(BuildStep insertStep,
                                        BuildInsertType insertType)
        {
            if (insertStep == null || insertType == BuildInsertType.None)
            {
                return;
            }

            switch (insertType)
            {
            case BuildInsertType.None:
                break;

            case BuildInsertType.Before:
                if (_beforeSteps != null)
                {
                    _beforeSteps.Add(insertStep);
                }
                break;

            case BuildInsertType.Replace:
                if (_replaceSteps != null)
                {
                    _replaceSteps.Add(insertStep);
                }
                break;

            case BuildInsertType.After:
                if (_afterSteps != null)
                {
                    _afterSteps.Add(insertStep);
                }
                break;
            }
        }
Example #2
0
        public void Insert(BuildStep insertStep, BuildInsertType insertType)
        {
            BuildExceptions.NotNull(insertStep, "insertStep");

            switch (insertType)
            {
            case BuildInsertType.None:
                break;

            case BuildInsertType.Before:
                if (_beforeSteps == null)
                {
                    _beforeSteps = new BuildMultiStep();
                }
                break;

            case BuildInsertType.Replace:
                if (_replaceSteps == null)
                {
                    _replaceSteps = new BuildMultiStep();
                }
                break;

            case BuildInsertType.After:
                if (_afterSteps == null)
                {
                    _afterSteps = new BuildMultiStep();
                }
                break;
            }

            if (insertType != BuildInsertType.None)
            {
                this.OnInsert(insertStep, insertType);
            }
        }