コード例 #1
0
 private static Func <object> CreateFactory(Type type)
 {
     return(FastActivator.factories[type] = FastActivator.CompileFactory <object>(type));
 }
コード例 #2
0
 /// <summary>
 /// Creates the instance of the type.
 /// </summary>
 /// <param name="type">The type of instance to create.</param>
 public static object CreateInstance(Type type)
 {
     return(FastActivator.GetFactory(type)());
 }