protected void Initialize() { Nails.Configure() .IoC.Container <NailsFramework.IoC.Spring>() .Persistence.DataMapper <NailsFramework.Persistence.NHibernate>( x => x.Configure(c => MappingConfigurator.Configure(c))) .UserInterface.Platform <NullUIPlatform>() .Logging.Logger <NullLogger>() .InspectAssembly(@"Encuentrame.Model.dll") .InspectAssembly(@"Encuentrame.Support.Mappings.dll") .InspectAssembly(@"Encuentrame.Model.Mappings.dll") .InspectAssembly(@"Encuentrame.Support.Email.dll") .InspectAssembly(@"Encuentrame.InfoUpdaterService.exe") .Initialize(); Thread.Sleep(3000); }
protected override void ConfigureNails(INailsConfigurator nails) { nails.IoC.Container <NailsFramework.IoC.Spring>() .Persistence.DataMapper <NailsFramework.Persistence.NHibernate>( x => x.Configure(c => MappingConfigurator.Configure(c))) .UserInterface.Platform <Mvc>() .Logging.Logger <Log4net>() .InspectAssembly(@"bin\Encuentrame.Model.dll") .InspectAssembly(@"bin\Encuentrame.Support.Mappings.dll") .InspectAssembly(@"bin\Encuentrame.Model.Mappings.dll") .InspectAssembly(@"bin\Encuentrame.Security.dll") .InspectAssembly(@"bin\Encuentrame.Web.dll") .InspectAssembly(@"bin\Encuentrame.Support.Email.dll") .InspectAssembly(@"bin\Encuentrame.Support.ExpoNotification.dll") .Aspects .ApplyBehavior <LogBehavior>().ToInheritorsOf(typeof(ControllerBase)) .ApplyBehavior <AuditBehavior>().ToMethodsWithAttribute <AuditAttribute>() .IoC.Lemming <DomainAuthenticationProvider>() .IoC.Lemming <AuthenticationDataProvider>() .IoC.Lemming <TranslationService>(); }
public static void AssemblyInit(TestContext context) { NailsTestsConfigurationRepository.Instance.Set("BaseTestConfiguration", (nails) => { nails .IoC.Container <NailsFramework.IoC.Spring>() .Persistence.DataMapper <NailsFramework.Persistence.NHibernate>( x => x.Configure(c => MappingConfigurator.Configure(c))) .UserInterface.Platform <NullUIPlatform>() .Logging.Logger <Log4net>() .InspectAssembly(@"Encuentrame.Model.dll") .InspectAssembly(@"Encuentrame.Support.Mappings.dll") .InspectAssembly(@"Encuentrame.Model.Mappings.dll") .InspectAssembly(@"Encuentrame.Tests.Supports.dll") .InspectAssembly(@"Encuentrame.Tests.dll") .InspectAssembly(@"Encuentrame.Support.Email.dll") .IoC.Lemming <DomainAuthenticationProvider>() .Lemming <AuthenticationDataProvider>() .Lemming <TranslationService>() .Initialize(); }); }
public Startup(IConfiguration configuration) { Configuration = configuration; MappingConfigurator.Configure(); }
public static void ConfigureMapper(IMapperConfigurationExpression expression) => MappingConfigurator.Configure(expression);