コード例 #1
0
 public ParametrosOrdemCompraAppService(
     IParametrosOrdemCompraRepository parametrosRepository,
     IParametrosOrcamentoAppService parametrosOrcamentoAppService,
     IParametrosContratoAppService parametrosContratoAppService,
     MessageQueue messageQueue)
     : base(messageQueue)
 {
     this.parametrosRepository          = parametrosRepository;
     this.parametrosOrcamentoAppService = parametrosOrcamentoAppService;
     this.parametrosContratoAppService  = parametrosContratoAppService;
 }
コード例 #2
0
        public void Initialize()
        {
            AuthenticationServiceFactory.SetCurrent(new FormsAuthenticationFactory());
            TypeAdapterFactory.SetCurrent(new AutomapperTypeAdapterFactory());
            MapperHelper.Initialise();

            EntityValidatorFactory.SetCurrent(new DataAnnotationsEntityValidatorFactory());

            var unitOfWork = new UnitOfWork();

            parametrosOrdemCompraRepository = new Infrastructure.Data.Repository.OrdemCompra.ParametrosOrdemCompraRepository(unitOfWork);
            messageQueue = new MessageQueue();
            parametrosOrcamentoRepository = new ParametrosOrcamentoRepository(unitOfWork);
            parametrosContratoRepository  = new ParametrosContratoRepository(unitOfWork);
            parametrosOrcamentoAppService = new ParametrosOrcamentoAppService(parametrosOrcamentoRepository, messageQueue);
            parametrosContratoAppService  = new ParametrosContratoAppService(parametrosContratoRepository, messageQueue);
        }