2004-06-10 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / nunit20 / util / TestEventArgs.cs
1 using System;
2
3 namespace NUnit.Util
4 {
5         /// <summary>
6         /// The delegate for all events related to loading test projects
7         /// </summary>
8         public delegate void TestProjectEventHandler ( object sender, TestProjectEventArgs args );
9
10         public enum TestProjectAction
11         {
12                 ProjectLoading,
13                 ProjectLoaded,
14                 ProjectLoadFailed,
15                 ProjectUnloading,
16                 ProjectUnloaded,
17                 ProjectUnloadFailed,
18         }
19
20         /// <summary>
21         /// Summary description for TestProjectEventArgs.
22         /// </summary>
23         public class TestProjectEventArgs : EventArgs
24         {
25                 #region Instance Variables
26
27                 // The action represented by the event
28                 private TestProjectAction action;
29
30                 // The project name
31                 private string projectName;
32                 
33                 // The exception causing a failure
34                 private Exception exception;
35
36                 #endregion
37
38                 #region Constructors
39
40                 public TestProjectEventArgs( TestProjectAction action, string projectName )
41                 {
42                         this.action = action;
43                         this.projectName = projectName;
44                 }
45
46                 public TestProjectEventArgs( TestProjectAction action,
47                         string projectName, Exception exception )
48                 {
49                         this.action = action;
50                         this.projectName = projectName;
51                         this.exception = exception;
52                 }
53
54                 #endregion
55
56                 #region Properties
57
58                 public TestProjectAction Action
59                 {
60                         get { return action; }
61                 }
62
63                 public string ProjectName
64                 {
65                         get { return projectName; }
66                 }
67
68                 public Exception Exception
69                 {
70                         get { return exception; }
71                 }
72
73                 #endregion
74         }
75 }