/src/NUnit/UiException/Controls/IErrorDisplay.cs

# · C# · 51 lines · 15 code · 5 blank · 31 comment · 0 complexity · 0f3541110271e12c06cd22d29d35bcbc MD5 · raw file

  1. // ****************************************************************
  2. // This is free software licensed under the NUnit license. You may
  3. // obtain a copy of the license at http://nunit.org
  4. // ****************************************************************
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Text;
  8. using System.Drawing;
  9. using System.Windows.Forms;
  10. namespace NUnit.UiException.Controls
  11. {
  12. /// <summary>
  13. /// This interface describes a feature that can be added to the ErrorWindow
  14. /// in order to show relevant information about failures/errors after a
  15. /// test suite run.
  16. /// Clients who wants to add their own display should implement this
  17. /// interface and register their instance to ErrorBrowser at run-time.
  18. ///
  19. /// Direct known implementations are:
  20. /// StackTraceDisplay
  21. /// SourceCodeDisplay
  22. /// </summary>
  23. public interface IErrorDisplay
  24. {
  25. /// <summary>
  26. /// Gives access to the ToolStripButton that enables this display.
  27. /// </summary>
  28. ToolStripButton PluginItem { get; }
  29. /// <summary>
  30. /// Gives access to a possibly null collection of option controls that will
  31. /// be shown when this display has the focus.
  32. /// </summary>
  33. ToolStripItem[] OptionItems { get; }
  34. /// <summary>
  35. /// Gives access to the content control of this display.
  36. /// </summary>
  37. Control Content { get; }
  38. /// <summary>
  39. /// Called whenever the user changes the error selection in the detail list.
  40. /// This method is called to allow the display to update its content according
  41. /// the given stack trace.
  42. /// </summary>
  43. /// <param name="stackTrace"></param>
  44. void OnStackTraceChanged(string stackTrace);
  45. }
  46. }