public RecordEntry Lookup(RecordEntry requestEntry, RecordMatcher matcher, RecordedTestSanitizer sanitizer, bool remove = true) { sanitizer.Sanitize(requestEntry); lock (Entries) { RecordEntry entry = matcher.FindMatch(requestEntry, Entries); if (remove) { Entries.Remove(entry); } return(entry); } }
public RecordEntry Lookup(RecordEntry requestEntry, RecordMatcher matcher, IEnumerable <RecordedTestSanitizer> sanitizers, bool remove = true) { foreach (RecordedTestSanitizer sanitizer in sanitizers) { sanitizer.Sanitize(requestEntry); } lock (Entries) { RecordEntry entry = matcher.FindMatch(requestEntry, Entries); if (remove) { Entries.Remove(entry); } return(entry); } }
public RecordEntry Lookup(RecordEntry requestEntry, RecordMatcher matcher, IEnumerable <RecordedTestSanitizer> sanitizers, bool remove = true) { foreach (RecordedTestSanitizer sanitizer in sanitizers) { sanitizer.Sanitize(requestEntry); } // normalize request body with STJ using relaxed escaping to match behavior when Deserializing from session files RecordEntry.NormalizeJsonBody(requestEntry.Request); lock (Entries) { RecordEntry entry = matcher.FindMatch(requestEntry, Entries); if (remove) { Entries.Remove(entry); } return(entry); } }