public ICollection<IPointToLaceProvider> GetResponses(ICollection<IPointToLaceRequest> request)
 {
     _buildSourceChain = new CreateSourceChain();
     _bootstrap = new Initialize(new Collection<IPointToLaceProvider>(), request, _bus, _buildSourceChain);
     _bootstrap.Execute(ChainType.All);
     return _bootstrap.DataProviderResponses ?? EmptyResponse;
 }
        public when_inititializing_lace_source_chain_for_vin_rgt_mm_code_search()
        {

            _command = BusFactory.WorkflowBus();
            _request = new LicensePlateMmCodeRequestBuilder().ForIvidRgtVinMmCode();
            _buildSourceChain = new CreateSourceChain();
        }
Esempio n. 3
0
        private ICollection<IPointToLaceProvider> Execute(ICollection<IPointToLaceRequest> request, ChainType chain)
        {
            try
            {
                Init(request.First().Request.RequestId);

                _logCommand.LogBegin(request);

                _dataProviderChain = new CreateSourceChain();
                _logCommand.LogEntryPointRequest(request, DataProviderNoRecordState.Billable);

                _bootstrap = new Initialize(new Collection<IPointToLaceProvider>(), request, _bus, _dataProviderChain);
                _bootstrap.Execute(chain);

                LogResponse(request);

                CreateTransaction(request, _bootstrap.DataProviderResponses.State());

                _logCommand.LogEnd(_bootstrap.DataProviderResponses ?? EmptyResponse);

                return _bootstrap.DataProviderResponses ?? EmptyResponse;
            }
            catch (Exception ex)
            {
                _logCommand.LogFault(ex.Message, request);
                _logCommand.LogEnd(request);
                Log.ErrorFormat("Error occurred receiving request {0}", ex, request.ObjectToJson());
                LogResponse(request);
                CreateTransaction(request, DataProviderResponseState.TechnicalError);
                return EmptyResponse;
            }
        }
        public when_initalizing_lace_source_chain_for_vin_rgt_vin_rgt_search()
        {

            _command = BusFactory.WorkflowBus();
            _request = new VinRequestBuilder().ForRgtAndRgtVin();
            _buildSourceChain = new CreateSourceChain();
        }
        public when_inititializing_lace_source_chain_for_MisMatchlicensePlate_number_search()
        {

            _command = BusFactory.WorkflowBus();
            _request = new LicensePlateRequestBuilder().ForAllSourcesWithMisMatchLicensePlate();
            _buildSourceChain = new CreateSourceChain();
        }
        public when_inititializing_lace_source_chain_for_rgt_vin_vin12()
        {

            _command = BusFactory.WorkflowBus();
            _request = new VinRequestBuilder().ForRgtVin12VinNumber();
            _buildSourceChain = new CreateSourceChain();
        }
Esempio n. 7
0
 public Initialize(ICollection<IPointToLaceProvider> responses, ICollection<IPointToLaceRequest> request, IAdvancedBus bus,
     IBuildSourceChain buildSourceChain)
 {
     _request = request;
     _bus = bus;
     DataProviderResponses = responses;
     _buildSourceChain = buildSourceChain;
 }
 public when_building_lace_source_chain_for_drivers_license_decryption()
 {
     _bus = Lace.Test.Helper.Builders.Buses.BusFactory.WorkflowBus();
     _request = new DriversLicenseRequestBuilder().ForDriversLicenseScan();
     _buildSourceChain = new FakeSourceChain();
     //_buildSourceChain = new FakeSourceChain(_request.GetFromRequest<IPointToLaceRequest>().Package);
     //_buildSourceChain.Build();
 }
 public when_initializing_lace_handlers_for_ivid_request()
 {
     _command = BusFactory.WorkflowBus();
     _request = new LicensePlateRequestBuilder().ForIvid();
     _buildSourceChain = new CreateSourceChain();
     //_buildSourceChain = new CreateSourceChain(_request.GetFromRequest<IPointToLaceRequest>().Package);
     //_buildSourceChain.Build();
     _initialize = new Initialize(new Collection<IPointToLaceProvider>(),  _request, _command, _buildSourceChain);
 }
        public ICollection<IPointToLaceProvider> GetResponsesForCarId(ICollection<IPointToLaceRequest> request)
        {
            _buildSourceChain = new FakeSourceChain();
            if (_checkForDuplicateRequests.IsRequestDuplicated(request.First())) return null;

            _bootstrap = new Initialize(new Collection<IPointToLaceProvider>(), request, _bus, _buildSourceChain);
            _bootstrap.Execute(ChainType.CarId);

            return _bootstrap.DataProviderResponses;
        }
 public when_initializing_car_id_chain_for_carid_and_year_search_for_all_carId_dp()
 {
     _command = BusFactory.WorkflowBus();
     _request = new CarIdRequestBuilder().ForAllCarIdSources();
     _buildSourceChain = new CreateSourceChain();
 }
 public when_initializing_lace_chain_with_ivid_and_ls_auto_with_vin12_vin()
 {
     _command = BusFactory.WorkflowBus();
     _request = new LicensePlateRequestBuilder().ForLightstoneVin12LicensePlate();
     _buildSourceChain = new CreateSourceChain();
 }
 public when_building_lace_source_chain_for_company_search()
 {
     _bus = BusFactory.WorkflowBus();
     _request = new CompanyRequestBuilder().ForLightstoneCompany();
     _buildSourceChain = new FakeSourceChain();
 }
 public when_initializing_car_id_chain_for_carid_and_year_search_on_ls_auto()
 {
     _command = BusFactory.WorkflowBus();
     _request = new CarIdRequestBuilder().ForLightstoneCarId();
     _buildSourceChain = new CreateSourceChain();
 }
 public when_initializing_lace_chain_with_ls_auto_with_vin12_vin()
 {
     _command = BusFactory.WorkflowBus();
     _request = new VinRequestBuilder().ForLightstoneVin12VinNumber();
     _buildSourceChain = new CreateSourceChain();
 }
 public when_initalizing_lace_chain_for_director_search()
 {
     _command = BusFactory.WorkflowBus();
     _request = new DirectorRequestBuilder().ForLightstoneDirector();
     _buildSourceChain = new CreateSourceChain();
 }
 public when_building_lace_source_chain_for_director_search()
 {
     _bus = BusFactory.WorkflowBus();
     _request = new DirectorRequestBuilder().ForLightstoneDirector();
     _buildSourceChain = new FakeSourceChain();
 }
 public when_building_lace_source_chain_for_license_plate_number_search()
 {
     _bus = BusFactory.WorkflowBus();
     _request = new LicensePlateRequestBuilder().ForAllSources();
     _buildSourceChain = new FakeSourceChain();
 }
 public when_initializing_lace_chain_for_pcubed_ez_score()
 {
     _command = BusFactory.WorkflowBus();
     _request = new PCubedRequestBuilder().ForEzScore();
     _buildSourceChain = new CreateSourceChain();
 }
 public when_initializing_lace_source_chain_for_drivers_license_decryption()
 {
     _command = BusFactory.WorkflowBus();
     _request = new DriversLicenseRequestBuilder().ForDriversLicenseScan();
     _buildSourceChain = new CreateSourceChain();
 }