public IHttpClient Decorate( IHttpClient httpClient, IHttpApiConfiguration httpApiConfiguration) { var httpApiWithInstrumenting = httpApiConfiguration as IHttpApiWithInstrumenting; if (httpApiWithInstrumenting is null) { return(httpClient); } return(httpClient.AddInstrumenting(httpApiWithInstrumenting, _callbacks)); }