Ejemplo n.º 1
0
 public override void PreInit(IIocManager instance)
 {
     instance.RegisterDbContext(Assembly.GetExecutingAssembly());
     instance.RegsiterRepositories(Assembly.GetExecutingAssembly());
     instance.RegisterAssemblies(Assembly.GetExecutingAssembly());
     base.PreInit(instance);
 }
Ejemplo n.º 2
0
 public override void PreInit(IIocManager instance)
 {
     instance.RegisterGeneric(typeof(MyServiceGeneric <>), typeof(IServiceGeneric <>));
     instance.RegisterType(typeof(MyServiceGeneric2), typeof(IServiceGeneric2 <int>));
     instance.RegisterGeneric(typeof(MyObjectProvider <>), typeof(IObjectProvider <>));
     instance.RegisterGeneric(typeof(RepositoryA <,>), typeof(IRepository <,>), "RepositoryA");
     instance.RegisterGeneric(typeof(RepositoryB <,>), typeof(IRepository <,>), "RepositoryB");
     instance.RegisterTypeAsObject(false, Assembly.GetExecutingAssembly().GetTypes().Where(c => typeof(MyDbObject).IsAssignableFrom(c)).ToArray());
     instance.RegisterAssemblies(Assembly.GetExecutingAssembly());
     base.PreInit(instance);
 }
Ejemplo n.º 3
0
 public override void PreInit(IIocManager instance)
 {
     instance.RegisterAssemblies(Assembly.GetExecutingAssembly());
     base.PreInit(instance);
 }
Ejemplo n.º 4
0
 public virtual void PreInit(IIocManager instance)
 {
     instance.RegisterAssemblies(Assembly.GetCallingAssembly());
 }