public static object CreateInstance(Type type, params object[] args) { if (null == args || 0 >= (uint)args.Length) { return(ActivatorUtils.FastCreateInstance(type)); } return(Activator.CreateInstance(type, args)); }
internal static object GetFormatter(Type t) { if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Expression <>)) { return(ActivatorUtils.FastCreateInstance(typeof(HyperionExpressionFormatter2 <>).GetCachedGenericType(t))); } return(null); }
internal static object GetFormatter(Type t) { if (typeof(Exception).IsAssignableFrom(t)) { return(ActivatorUtils.FastCreateInstance(typeof(HyperionExceptionFormatter <>).GetCachedGenericType(t))); } return(null); }
public static object CreateInstance(Type type, params object[] args) { if (null == args || args.Length == 0) { return(ActivatorUtils.FastCreateInstance(type)); } else { return(Activator.CreateInstance(type, args)); } }