mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
feat: Clarifying method usage
This commit is contained in:
parent
6e056c9dcc
commit
9df5f7ae37
1 changed files with 6 additions and 0 deletions
|
|
@ -147,6 +147,7 @@ namespace ICD.Common.Utils
|
|||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
[CanBeNull]
|
||||
public static object GetDefaultValue(Type type)
|
||||
{
|
||||
if (type == null)
|
||||
|
|
@ -314,6 +315,7 @@ namespace ICD.Common.Utils
|
|||
/// <param name="value"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
[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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue