using Abp.Modules;
using Abp.Reflection.Extensions;
using YGNT.QuestionLibrary.Core.Localization;
using YGNT.QuestionLibrary.Core.Permissions;

namespace YGNT.QuestionLibrary.Core
{
    public class QuestionLibraryCoreModule : AbpModule
    {
        public override void PreInitialize()
        {
            Configuration.Auditing.IsEnabledForAnonymousUsers = true;
            QuestionLibraryLocalizationConfigurer.Configure(Configuration.Localization);
            Configuration.Authorization.Providers.Add<QuestionLibraryAuthorizationProvider>();
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(QuestionLibraryCoreModule).GetAssembly());
        }
    }
}