Exemple #1
0
 internal Response(EventAggregator eventAggregator, ApiResult apiResult, IBadRequestProvider badRequestProvider,
                   LogWriter logWriter)
 {
     _apiResult = apiResult;
     _logWriter = logWriter;
     _shouldBe  = new ShouldBe(apiResult, badRequestProvider, logWriter);
     _headers   = new Headers(apiResult, logWriter);
     eventAggregator.Subscribe(_shouldBe);
 }
Exemple #2
0
 internal Response(EventAggregator eventAggregator, ApiResult?apiResult, IBadRequestProvider badRequestProvider,
                   LogWriter logWriter)
 {
     _apiResult = apiResult ?? throw new BardException("apiResult cannot be null");
     _logWriter = logWriter;
     _shouldBe  = new ShouldBe(apiResult, badRequestProvider, logWriter, logWriter.Serializer);
     _headers   = new Headers(apiResult, logWriter);
     eventAggregator.Subscribe(_shouldBe);
     eventAggregator.SubscribeToApiRequests(_shouldBe);
     eventAggregator.SubscribeToApiRequests(_headers);
     eventAggregator.SubscribeToApiRequests(this);
 }