コード例 #1
0
        public static IServiceCollection RegisterServicesFromModule <T>(this IServiceCollection services)
            where T : IServicesModule
        {
            IServicesModule module = Activator.CreateInstance <T>();

            module.Register(services);
            return(services);
        }
コード例 #2
0
 public static IServiceCollection RegisterServicesFromModule(this IServiceCollection services,
                                                             IServicesModule module)
 {
     module.Register(services);
     return(services);
 }