diff --git a/ICD.Common.Utils/EventArguments/GenericEventArgs.cs b/ICD.Common.Utils/EventArguments/GenericEventArgs.cs index 9ed83a6..51f40cd 100644 --- a/ICD.Common.Utils/EventArguments/GenericEventArgs.cs +++ b/ICD.Common.Utils/EventArguments/GenericEventArgs.cs @@ -4,10 +4,17 @@ namespace ICD.Common.Utils.EventArguments { public class GenericEventArgs : EventArgs, IGenericEventArgs { + private readonly T m_Data; + /// /// Gets the wrapped data associated with the event. /// - public T Data { get; private set; } + object IGenericEventArgs.Data { get { return Data; } } + + /// + /// Gets the wrapped data associated with the event. + /// + public T Data { get { return m_Data; } } /// /// Constructor. @@ -15,7 +22,7 @@ namespace ICD.Common.Utils.EventArguments /// public GenericEventArgs(T data) { - Data = data; + m_Data = data; } } } diff --git a/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs b/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs index 626a292..f701f03 100644 --- a/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs +++ b/ICD.Common.Utils/EventArguments/IGenericEventArgs.cs @@ -1,10 +1,18 @@ namespace ICD.Common.Utils.EventArguments { - public interface IGenericEventArgs + public interface IGenericEventArgs { /// /// Gets the wrapped data associated with the event. /// - T Data { get; } + object Data { get; } + } + + public interface IGenericEventArgs : IGenericEventArgs + { + /// + /// Gets the wrapped data associated with the event. + /// + new T Data { get; } } }