internal Cassette(ICasseteStorage storage, string name, RecordMode recordMode, IRequestMatcher requestMatcher) { _storage = storage ?? throw new ArgumentNullException(nameof(storage)); _name = name ?? throw new ArgumentNullException(nameof(name)); _requestMatcher = requestMatcher ?? throw new ArgumentNullException(nameof(requestMatcher)); _recordMode = recordMode; var httpInteractions = storage.Load(name); if (httpInteractions == null) { _isNew = true; _httpInteractions = new List <HttpInteraction>(); } else { _isNew = false; _httpInteractions = httpInteractions; } }
/// <summary> /// Cassette Storage to use. /// </summary> /// <param name="storage">Storage implementatino to use</param> public VCR(ICasseteStorage storage) { Storage = storage ?? throw new System.ArgumentNullException(nameof(storage)); }