PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/src/NUnit/util/RecentFiles.cs

#
C# | 55 lines | 14 code | 7 blank | 34 comment | 0 complexity | ca5776fa0e6fc1accb988966f981044a MD5 | raw file
Possible License(s): GPL-2.0
  1. // ****************************************************************
  2. // Copyright 2007, Charlie Poole
  3. // This is free software licensed under the NUnit license. You may
  4. // obtain a copy of the license at http://nunit.org
  5. // ****************************************************************
  6. using System;
  7. using System.Collections;
  8. namespace NUnit.Util
  9. {
  10. /// <summary>
  11. /// The RecentFiles interface is used to isolate the app
  12. /// from various implementations of recent files.
  13. /// </summary>
  14. public interface RecentFiles
  15. {
  16. /// <summary>
  17. /// The max number of files saved
  18. /// </summary>
  19. int MaxFiles { get; set; }
  20. /// <summary>
  21. /// The current number of saved files
  22. /// </summary>
  23. int Count { get; }
  24. /// <summary>
  25. /// Get a list of all the file entries
  26. /// </summary>
  27. /// <returns>The most recent file list</returns>
  28. RecentFilesCollection Entries { get; }
  29. /// <summary>
  30. /// Set the most recent file entry, reordering
  31. /// the saved names as needed and removing the oldest
  32. /// if the max number of files would be exceeded.
  33. /// </summary>
  34. void SetMostRecent( RecentFileEntry entry );
  35. /// <summary>
  36. /// Set the most recent file name, reordering
  37. /// the saved names as needed and removing the oldest
  38. /// if the max number of files would be exceeded.
  39. /// The current CLR version is used to create the entry.
  40. /// </summary>
  41. void SetMostRecent( string fileName );
  42. /// <summary>
  43. /// Remove a file from the list
  44. /// </summary>
  45. /// <param name="fileName">The name of the file to remove</param>
  46. void Remove( string fileName );
  47. }
  48. }