protected override void Load(ContainerBuilder builder) { TypeFindExtensions.AddAssmbly(ThisAssembly); if (IsLastModule) { builder.AddDependencyRegister(TypeFindExtensions.DictionaryAssembly["Assembly"] ?? new List <Assembly>()); } base.Load(builder); RegisterCustomModule(builder); }
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); } }