diff --git a/src/ServiceFabric.Mocks/ReflectionHelpers.cs b/src/ServiceFabric.Mocks/ReflectionHelpers.cs index 57ba386..8608579 100644 --- a/src/ServiceFabric.Mocks/ReflectionHelpers.cs +++ b/src/ServiceFabric.Mocks/ReflectionHelpers.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Reflection; -using System.Text; -using System.Threading.Tasks; using static ServiceFabric.Mocks.Constants; @@ -16,6 +12,7 @@ public static T CreateInstance() { return (T)Activator.CreateInstance(typeof(T), BindingFlags.Instance | BindingFlags.NonPublic, null, null, CultureInfo.CurrentCulture); } + public static T CreateInstance(object[] args) { return (T)Activator.CreateInstance(typeof(T), BindingFlags.Instance | BindingFlags.NonPublic, null, args, CultureInfo.CurrentCulture);