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 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 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 override void Observe() { _initialize = new Initialize(new Collection<IPointToLaceProvider>(), _request, _command, _buildSourceChain); _initialize.Execute(ChainType.All); }