/// <summary> /// Creates a new replay object and enqueues it for requesting. /// </summary> /// <param name="messageInfo"> /// The message info. /// </param> /// <param name="cancellationToken"> /// The source stream cancellation token. /// </param> /// <returns> /// A newly constructed relay object. /// </returns> public ResponseReplay CreateReplay(HttpMessageInfo messageInfo, CancellationToken cancellationToken) { var replay = new ResponseReplay(V4HttpEndpoint, messageInfo, cancellationToken); // Fun fact I didn't know - the indexer is atomic and thread safe. So much easier than // AddOrUpdate w/ func! _replays[messageInfo.MessageId] = replay; return(replay); }
/// <summary> /// Constructs a FilterHttpResponseHandler instance. /// </summary> /// <param name="replay"> /// The response replay object. /// </param> public ReplayHttpResponseHandler( ResponseReplay replay ) { _replay = replay; }