#region CPL License
/*
Nuclex.NAnt.Tasks
Copyright (C) 2009 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using System.Collections;
using NAnt.Core.Types;
namespace Nuclex.NAnt.Tasks {
///
/// Enumerates the elements of a .
///
public class FileSetEnumerator : IEnumerator {
///
/// Initializes a new instance of the
/// class
/// with the specified .
///
/// The collection that should be enumerated.
internal FileSetEnumerator(FileSetCollection FileSets) {
IEnumerable temp = FileSets;
this._baseEnumerator = temp.GetEnumerator();
}
///
/// Advances the enumerator to the next element of the collection.
///
///
/// if the enumerator was successfully advanced
/// to the next element; if the enumerator has
/// passed the end of the collection.
///
public bool MoveNext() {
return this._baseEnumerator.MoveNext();
}
/// Gets the current element in the collection.
/// The current element in the collection.
public FileSet Current {
get {
return (FileSet)this._baseEnumerator.Current;
}
}
///
/// Sets the enumerator to its initial position, which is before the
/// first element in the collection.
///
public void Reset() {
this._baseEnumerator.Reset();
}
bool IEnumerator.MoveNext() {
return this._baseEnumerator.MoveNext();
}
void IEnumerator.Reset() {
this._baseEnumerator.Reset();
}
object IEnumerator.Current {
get {
return this._baseEnumerator.Current;
}
}
private IEnumerator _baseEnumerator;
}
} // namespace Nuclex.NAnt.Tasks