1 // ****************************************************************
\r
2 // Copyright 2007, Charlie Poole
\r
3 // This is free software licensed under the NUnit license. You may
\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4
\r
5 // ****************************************************************
\r
8 using System.Collections;
\r
10 namespace NUnit.Util
\r
13 /// Summary description for RecentFilesCollection.
\r
15 public class RecentFilesCollection : ReadOnlyCollectionBase
\r
17 public void Add( RecentFileEntry entry )
\r
19 InnerList.Add( entry );
\r
22 public void Insert( int index, RecentFileEntry entry )
\r
24 InnerList.Insert( index, entry );
\r
27 public void Remove( string fileName )
\r
29 int index = IndexOf( fileName );
\r
34 public void RemoveAt( int index )
\r
36 InnerList.RemoveAt( index );
\r
39 public int IndexOf( string fileName )
\r
41 for( int index = 0; index < InnerList.Count; index++ )
\r
42 if ( this[index].Path == fileName )
\r
47 public RecentFileEntry this[int index]
\r
49 get { return (RecentFileEntry)InnerList[index]; }
\r