public PlaybackHandler( IPlaybackContext playbackContext, IPlaybackStorageService playbackStorageService, string handlerName, IHttpClientPlaybackErrorSimulationService configService) : this(new HttpClientHandler(), playbackContext, playbackStorageService, handlerName, configService) { }
public MyPlaybackProxy(IPlaybackContext playbackContext, IPlaybackStorageService playbackStorageService, IHttpClientPlaybackErrorSimulationService configService) : base(new System.Net.Http.HttpClient()) { _playbackContext = playbackContext; _playbackStorageService = playbackStorageService; _configService = configService; base.HttpClient = HttpClientFactory.WithPlaybackContext(playbackContext, playbackStorageService, PROXY_NAME, configService); }
public static HttpClient WithPlaybackContext( IPlaybackContext playbackContext, IPlaybackStorageService playbackStorageService, string prefix, IHttpClientPlaybackErrorSimulationService configService) { var handler = new PlaybackHandler(playbackContext, playbackStorageService, prefix, configService); var httpClient = new HttpClient(handler); return(httpClient); }
public PlaybackHandler(HttpMessageHandler innerHandler, IPlaybackContext playbackContext, IPlaybackStorageService playbackStorageService, string handlerName, IHttpClientPlaybackErrorSimulationService configService) : base(innerHandler) { _playbackStorageService = playbackStorageService; _playbackContext = playbackContext; _handlerName = handlerName; _config = configService.GetNamedConfig(handlerName).Result; }