/// <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]); } }
/// <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(); }
/// <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); }
/// <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(); }
/// <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]); } }
/// <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); }
/// <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); } }