From 8d753e1cf9c70cd12f6db610cfe7ad830c3f35c9 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 10 Apr 2018 12:08:29 -0400 Subject: [PATCH] feat: Adding IGenericEventArgs interface for convenience --- ICD.Common.Utils/EventArguments/GenericEventArgs.cs | 5 ++++- ICD.Common.Utils/EventArguments/IGenericEventArgs.cs | 10 ++++++++++ ICD.Common.Utils/ICD.Common.Utils_SimplSharp.csproj | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ICD.Common.Utils/EventArguments/IGenericEventArgs.cs diff --git a/ICD.Common.Utils/EventArguments/GenericEventArgs.cs b/ICD.Common.Utils/EventArguments/GenericEventArgs.cs index 895a067..9ed83a6 100644 --- a/ICD.Common.Utils/EventArguments/GenericEventArgs.cs +++ b/ICD.Common.Utils/EventArguments/GenericEventArgs.cs @@ -2,8 +2,11 @@ namespace ICD.Common.Utils.EventArguments { - public class GenericEventArgs : EventArgs + public class GenericEventArgs : EventArgs, IGenericEventArgs { + /// + /// Gets the wrapped data associated with the event. + /// public T Data { get; private set; } /// diff --git a/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs b/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs new file mode 100644 index 0000000..626a292 --- /dev/null +++ b/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs @@ -0,0 +1,10 @@ +namespace ICD.Common.Utils.EventArguments +{ + public interface IGenericEventArgs + { + /// + /// Gets the wrapped data associated with the event. + /// + T Data { get; } + } +} diff --git a/ICD.Common.Utils/ICD.Common.Utils_SimplSharp.csproj b/ICD.Common.Utils/ICD.Common.Utils_SimplSharp.csproj index 63af157..8038e0b 100644 --- a/ICD.Common.Utils/ICD.Common.Utils_SimplSharp.csproj +++ b/ICD.Common.Utils/ICD.Common.Utils_SimplSharp.csproj @@ -81,6 +81,7 @@ +