示例#1
0
 /// <summary>
 /// Adds the elements of a <see cref="BuildListenerCollection"/> to the end of the collection.
 /// </summary>
 /// <param name="items">The <see cref="BuildListenerCollection"/> to be added to the end of the collection.</param>
 public void AddRange(BuildListenerCollection items)
 {
     for (int i = 0; (i < items.Count); i = (i + 1))
     {
         Add(items[i]);
     }
 }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BuildListenerEnumerator"/> class
        /// with the specified <see cref="BuildListenerCollection"/>.
        /// </summary>
        /// <param name="arguments">The collection that should be enumerated.</param>
        internal BuildListenerEnumerator(BuildListenerCollection arguments)
        {
            IEnumerable temp = (IEnumerable)(arguments);

            _baseEnumerator = temp.GetEnumerator();
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildListenerCollection"/>
 /// class with the specified <see cref="BuildListenerCollection"/> instance.
 /// </summary>
 public BuildListenerCollection(BuildListenerCollection value)
 {
     AddRange(value);
 }
示例#4
0
文件: Log.cs 项目: vardars/ci-factory
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildListenerEnumerator"/> class
 /// with the specified <see cref="BuildListenerCollection"/>.
 /// </summary>
 /// <param name="arguments">The collection that should be enumerated.</param>
 internal BuildListenerEnumerator(BuildListenerCollection arguments)
 {
     IEnumerable temp = (IEnumerable) (arguments);
     _baseEnumerator = temp.GetEnumerator();
 }
示例#5
0
文件: Log.cs 项目: vardars/ci-factory
 /// <summary>
 /// Adds the elements of a <see cref="BuildListenerCollection"/> to the end of the collection.
 /// </summary>
 /// <param name="items">The <see cref="BuildListenerCollection"/> to be added to the end of the collection.</param> 
 public void AddRange(BuildListenerCollection items)
 {
     for (int i = 0; (i < items.Count); i = (i + 1)) {
         Add(items[i]);
     }
 }
示例#6
0
文件: Log.cs 项目: vardars/ci-factory
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildListenerCollection"/> 
 /// class with the specified <see cref="BuildListenerCollection"/> instance.
 /// </summary>
 public BuildListenerCollection(BuildListenerCollection value)
 {
     AddRange(value);
 }
示例#7
0
        /// <summary>
        /// Attaches the specified build listeners to the <see cref="Project" />.
        /// </summary>
        /// <param name="listeners">The <see cref="IBuildListener" /> instances to attach to the <see cref="Project" />.</param>
        /// <remarks>
        /// The currently attached <see cref="IBuildListener" /> instances will 
        /// be detached before the new <see cref="IBuildListener" /> instances 
        /// are attached.
        /// </remarks>
        public void AttachBuildListeners(BuildListenerCollection listeners)
        {
            // detach currently attached build listeners
            DetachBuildListeners();
            foreach (IBuildListener listener in listeners) {
                // hook up listener to project build events
                BuildStarted += new BuildEventHandler(listener.BuildStarted);
                BuildFinished += new BuildEventHandler(listener.BuildFinished);
                TargetStarted += new BuildEventHandler(listener.TargetStarted);
                TargetFinished += new BuildEventHandler(listener.TargetFinished);
                TaskStarted += new BuildEventHandler(listener.TaskStarted);
                TaskFinished += new BuildEventHandler(listener.TaskFinished);
                MessageLogged += new BuildEventHandler(listener.MessageLogged);

                // add listener to project listener list
                BuildListeners.Add(listener);
            }
        }