From 9df5f7ae37147150d7bae2c7979d696a8c62e8a4 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 12 Jul 2019 17:17:05 -0400 Subject: [PATCH] feat: Clarifying method usage --- ICD.Common.Utils/ReflectionUtils.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ICD.Common.Utils/ReflectionUtils.cs b/ICD.Common.Utils/ReflectionUtils.cs index fd8ee62..630d231 100644 --- a/ICD.Common.Utils/ReflectionUtils.cs +++ b/ICD.Common.Utils/ReflectionUtils.cs @@ -147,6 +147,7 @@ namespace ICD.Common.Utils /// /// /// + [CanBeNull] public static object GetDefaultValue(Type type) { if (type == null) @@ -314,6 +315,7 @@ namespace ICD.Common.Utils /// /// /// + [CanBeNull] public static object ChangeType(object value, Type type) { if (type == null) @@ -372,7 +374,9 @@ namespace ICD.Common.Utils throw new ArgumentNullException("eventHandler"); object handler = eventHandler.Target; +// ReSharper disable InvokeAsExtensionMethod MethodInfo callback = EventHandlerExtensions.GetMethodInfo(eventHandler); +// ReSharper restore InvokeAsExtensionMethod return SubscribeEvent(instance, eventInfo, handler, callback); } @@ -394,7 +398,9 @@ namespace ICD.Common.Utils throw new ArgumentNullException("eventHandler"); object handler = eventHandler.Target; +// ReSharper disable InvokeAsExtensionMethod MethodInfo callback = EventHandlerExtensions.GetMethodInfo(eventHandler); +// ReSharper restore InvokeAsExtensionMethod return SubscribeEvent(instance, eventInfo, handler, callback); }