Ejemplo n.º 1
0
        public static void RegisterAssemblyTypesBySingletonExclude(this UnityContainer container, Type baseTypes, Type excludeTypes)
        {
            var list = GetCallingTypes(baseTypes);

            list = list.Where(item => item != excludeTypes).ToList();
            container.RegisterAssemblyTypesBySingleton(list);
        }
Ejemplo n.º 2
0
        public static void RegisterAssemblyTypesBySingleton(this UnityContainer container, Type baseTypes)
        {
            var list = GetCallingTypes(baseTypes);

            container.RegisterAssemblyTypesBySingleton(list);
        }
Ejemplo n.º 3
0
        public static void RegisterAssemblyTypesBySingleton(this UnityContainer container, string assemblyName)
        {
            var list = GetChildTypes(assemblyName);

            container.RegisterAssemblyTypesBySingleton(list);
        }