-
Notifications
You must be signed in to change notification settings - Fork 235
Expand file tree
/
Copy pathModifiableRecordSession.cs
More file actions
54 lines (41 loc) · 1.67 KB
/
ModifiableRecordSession.cs
File metadata and controls
54 lines (41 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
namespace Azure.Sdk.Tools.TestProxy.Common
{
public class ModifiableRecordSession
{
public RecordMatcher CustomMatcher { get; set;}
public RecordSession Session { get; }
public ModifiableRecordSession(SanitizerDictionary sanitizerRegistry, string sessionId)
{
this.AppliedSanitizers = sanitizerRegistry.SessionSanitizers.ToList();
this.SessionId = sessionId;
}
public ModifiableRecordSession(RecordSession session, SanitizerDictionary sanitizerRegistry, string sessionId)
{
Session = session;
this.AppliedSanitizers = sanitizerRegistry.SessionSanitizers.ToList();
this.SessionId = sessionId;
}
public string SessionId;
public string Path { get; set; }
public HttpClient Client { get; set; }
public List<ResponseTransform> AdditionalTransforms { get; } = new List<ResponseTransform>();
public List<string> AppliedSanitizers { get; set; } = new List<string>();
public List<string> ForRemoval { get; } = new List<string>();
public string SourceRecordingId { get; set; }
public int PlaybackResponseTime { get; set; }
public void ResetExtensions(SanitizerDictionary sanitizerDictionary)
{
AdditionalTransforms.Clear();
AppliedSanitizers = new List<string>();
AppliedSanitizers.AddRange(sanitizerDictionary.SessionSanitizers);
ForRemoval.Clear();
CustomMatcher = null;
Client = null;
}
}
}