private List <Type> FindPersistentTypes()
 {
     return(_exceptedModules.GetAssemblies(false).SelectMany(s =>
                                                             s.GetTypes().Where(type =>
                                                                                TypeHelper.IsConcrete(type) && typeof(IPersistentObject).IsAssignableFrom(type))).ToList());
 }
Пример #2
0
        //Base on MediatR.Registration
        //see https://github.com/jbogard/MediatR.Extensions.Microsoft.DependencyInjection
        public static void ResigterDomainEventHandler(this IServiceCollection services, IMiCakeModuleCollection miCakeModules)
        {
            var assemblies = miCakeModules.GetAssemblies(false).ToList();

            ConnectImplementationsToTypesClosing(typeof(IDomainEventHandler <>), services, assemblies, true);
        }
Пример #3
0
 private Assembly[] GetDomianLayer(IMiCakeModuleCollection miCakeModules)
 {
     return(miCakeModules.GetAssemblies(false).Where(asm =>
                                                     asm.GetTypes().AsEnumerable().Any(inModuleType =>
                                                                                       DomainTypeHelper.IsDomainObject(inModuleType))).ToArray());
 }