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
|
#region EventName: MyEvent
/// <summary>
/// <see cref="MyEvent"/>
/// </summary>
private event EventHandler<MyEventArgs> _MyEvent;
/// <summary>
/// ...
/// </summary>
public event EventHandler<MyEventArgs> MyEvent
{
add { _MyEvent += value; }
remove { _MyEvent -= value; }
}
/// <summary>
/// ...
/// </summary>
/// <param name="e">The event args
/// instance containing the event data.</param>
protected virtual void OnMyEvent(MyEventArgs e)
{
try
{
if(_MyEvent != null)
{
_MyEvent(this, e);
}
}
catch
{
//TODO: exception handling
throw;
}
}
#endregion
|