Exemplo n.º 1
0
 /// <summary>
 /// 创建实例
 /// </summary>
 /// <typeparam name="T">实例类型</typeparam>
 /// <param name="name">服务名称</param>
 public static T Create <T>(string name = null)
 {
     return(DefaultContainer.Create <T>(name));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 创建对象
 /// </summary>
 /// <param name="type">对象类型</param>
 public static object Create(Type type)
 {
     return(Container.Create(type));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 创建实例
 /// </summary>
 /// <typeparam name="T">实例类型</typeparam>
 public static T Create <T>()
 {
     return(DefaultContainer.Create <T>());
 }
Exemplo n.º 4
0
 /// <summary>
 /// 创建实例
 /// </summary>
 /// <typeparam name="T">实例类型</typeparam>
 public static T Create <T>()
 {
     return(Container.Create <T>());
 }