示例#1
0
        /// <summary>
        /// Add the listeners specified in the command line arguments,
        /// along with the default listener, to the specified project.
        /// </summary>
        private void AddBuildListeners()
        {
            Assert.NotNull(_project, "project");

            // Create new logger
            IBuildLogger buildLogger = new GuiLogger(_logger);

            // set threshold of build logger equal to threshold of project
            buildLogger.Threshold = _project.Threshold;

            // add build logger to listeners collection
            BuildListenerCollection listeners = new BuildListenerCollection();

            listeners.Add(buildLogger);

            // attach listeners to project
            _project.AttachBuildListeners(listeners);
        }
        /// <summary>
        /// Add the listeners specified in the command line arguments,
        /// along with the default listener, to the specified project.
        /// </summary>
        private void AddBuildListeners()
        {
            Assert.NotNull(_project, "project");

            // Create new logger
            IBuildLogger buildLogger = new GuiLogger(_logger);

            // set threshold of build logger equal to threshold of project
            buildLogger.Threshold = _project.Threshold;

            // add build logger to listeners collection
            BuildListenerCollection listeners = new BuildListenerCollection();
            listeners.Add(buildLogger);

            // attach listeners to project
            _project.AttachBuildListeners(listeners);
        }