feat: Adding IGenericEventArgs<T> interface for convenience

This commit is contained in:
Chris Cameron
2018-04-10 12:08:29 -04:00
parent 29eb28b1f1
commit 8d753e1cf9
3 changed files with 15 additions and 1 deletions

View File

@@ -2,8 +2,11 @@
namespace ICD.Common.Utils.EventArguments
{
public class GenericEventArgs<T> : EventArgs
public class GenericEventArgs<T> : EventArgs, IGenericEventArgs<T>
{
/// <summary>
/// Gets the wrapped data associated with the event.
/// </summary>
public T Data { get; private set; }
/// <summary>

View File

@@ -0,0 +1,10 @@
namespace ICD.Common.Utils.EventArguments
{
public interface IGenericEventArgs<T>
{
/// <summary>
/// Gets the wrapped data associated with the event.
/// </summary>
T Data { get; }
}
}

View File

@@ -81,6 +81,7 @@
<Compile Include="EventArguments\DateTimeEventArgs.cs" />
<Compile Include="EventArguments\FloatEventArgs.cs" />
<Compile Include="EventArguments\GenericEventArgs.cs" />
<Compile Include="EventArguments\IGenericEventArgs.cs" />
<Compile Include="EventArguments\IntEventArgs.cs" />
<Compile Include="EventArguments\StringEventArgs.cs" />
<Compile Include="EventArguments\UShortEventArgs.cs" />