From 8cae5910df6a9bc0cbd5ed88863169915d141617 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 27 Jun 2017 15:06:32 -0400 Subject: [PATCH] ISettings exposes Type of originator --- ICD.Common.Utils/Utils/ReflectionUtils.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ICD.Common.Utils/Utils/ReflectionUtils.cs b/ICD.Common.Utils/Utils/ReflectionUtils.cs index 621b9e1..08656c9 100644 --- a/ICD.Common.Utils/Utils/ReflectionUtils.cs +++ b/ICD.Common.Utils/Utils/ReflectionUtils.cs @@ -189,6 +189,18 @@ namespace ICD.Common.Utils return Activator.CreateInstance(); } + /// + /// Creates an instance of the given type, calling the default constructor. + /// + /// + public static object CreateInstance(Type type) + { + if (type == null) + throw new ArgumentNullException("type"); + + return Activator.CreateInstance(type); + } + /// /// Gets the custom attributes added to the given assembly. ///