forked from RoliSoft/RS-TV-Show-Tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EventArgs.cs
146 lines (132 loc) · 4.76 KB
/
EventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
namespace RoliSoft.TVShowTracker
{
using System;
/// <summary>
/// Generic <c>EventArgs</c> class to further simplify event creation.
/// </summary>
/// <typeparam name="T">Type of the data.</typeparam>
public class EventArgs<T> : EventArgs
{
/// <summary>
/// Gets or sets the data of type T.
/// </summary>
/// <value>The data.</value>
public T Data { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EventArgs<T>"/> class.
/// </summary>
/// <param name="data">The data.</param>
public EventArgs(T data)
{
Data = data;
}
}
/// <summary>
/// Generic <c>EventArgs</c> class accepting 2 arguments to further simplify event creation.
/// </summary>
/// <typeparam name="T1">The type of the first data.</typeparam>
/// <typeparam name="T2">The type of the second data.</typeparam>
public class EventArgs<T1, T2> : EventArgs
{
/// <summary>
/// Gets or sets the first data of type T.
/// </summary>
/// <value>The data.</value>
public T1 First { get; set; }
/// <summary>
/// Gets or sets the second data of type T.
/// </summary>
/// <value>The data.</value>
public T2 Second { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EventArgs<T>"/> class.
/// </summary>
/// <param name="first">The first data.</param>
/// <param name="second">The second data.</param>
public EventArgs(T1 first, T2 second)
{
First = first;
Second = second;
}
}
/// <summary>
/// Generic <c>EventArgs</c> class accepting 3 arguments to further simplify event creation.
/// </summary>
/// <typeparam name="T1">The type of the first data.</typeparam>
/// <typeparam name="T2">The type of the second data.</typeparam>
/// <typeparam name="T3">The type of the third data.</typeparam>
public class EventArgs<T1, T2, T3> : EventArgs
{
/// <summary>
/// Gets or sets the first data of type T.
/// </summary>
/// <value>The data.</value>
public T1 First { get; set; }
/// <summary>
/// Gets or sets the second data of type T.
/// </summary>
/// <value>The data.</value>
public T2 Second { get; set; }
/// <summary>
/// Gets or sets the third data of type T.
/// </summary>
/// <value>The data.</value>
public T3 Third { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EventArgs<T>"/> class.
/// </summary>
/// <param name="first">The first data.</param>
/// <param name="second">The second data.</param>
/// <param name="third">The third data.</param>
public EventArgs(T1 first, T2 second, T3 third)
{
First = first;
Second = second;
Third = third;
}
}
/// <summary>
/// Generic <c>EventArgs</c> class accepting 4 arguments to further simplify event creation.
/// </summary>
/// <typeparam name="T1">The type of the first data.</typeparam>
/// <typeparam name="T2">The type of the second data.</typeparam>
/// <typeparam name="T3">The type of the third data.</typeparam>
/// <typeparam name="T4">The type of the fourth data.</typeparam>
public class EventArgs<T1, T2, T3, T4> : EventArgs
{
/// <summary>
/// Gets or sets the first data of type T.
/// </summary>
/// <value>The data.</value>
public T1 First { get; set; }
/// <summary>
/// Gets or sets the second data of type T.
/// </summary>
/// <value>The data.</value>
public T2 Second { get; set; }
/// <summary>
/// Gets or sets the third data of type T.
/// </summary>
/// <value>The data.</value>
public T3 Third { get; set; }
/// <summary>
/// Gets or sets the fourth data of type T.
/// </summary>
/// <value>The data.</value>
public T4 Fourth { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EventArgs<T>"/> class.
/// </summary>
/// <param name="first">The first data.</param>
/// <param name="second">The second data.</param>
/// <param name="third">The third data.</param>
/// <param name="fourth">The fourth data.</param>
public EventArgs(T1 first, T2 second, T3 third, T4 fourth)
{
First = first;
Second = second;
Third = third;
Fourth = fourth;
}
}
}