Пример #1
0
        protected override void Load(ContainerBuilder builder)
        {
            TypeFindExtensions.AddAssmbly(ThisAssembly);

            if (IsLastModule)
            {
                builder.AddDependencyRegister(TypeFindExtensions.DictionaryAssembly["Assembly"] ?? new List <Assembly>());
            }

            base.Load(builder);

            RegisterCustomModule(builder);
        }
Пример #2
0
        private static void FindAndAutoMapTypes(IMapperConfigurationExpression configuration)
        {
            var types = TypeFindExtensions.Find(type =>
            {
                var typeInfo = type.GetTypeInfo();
                return(typeInfo.IsDefined(typeof(AutoMapAttribute)));
            }
                                                );

            foreach (var type in types)
            {
                configuration.CreateAutoAttributeMaps(type);
            }
        }