public void TestClear(HeaderType headerType) { INameValueCollection headers = this.CreateHeaders(headerType); headers[Key] = Guid.NewGuid().ToString(); headers.Clear(); Assert.IsNull(headers[Key]); }
public void TestClearWithKnownProperties(HeaderType headerType) { INameValueCollection headers = this.CreateHeaders(headerType); headers[Key] = Guid.NewGuid().ToString(); headers.Add(HttpConstants.HttpHeaders.PartitionKey, Guid.NewGuid().ToString()); headers.Add(HttpConstants.HttpHeaders.Continuation, Guid.NewGuid().ToString()); headers[HttpConstants.HttpHeaders.RetryAfterInMilliseconds] = "20"; headers.Clear(); Assert.IsNull(headers[Key]); Assert.IsNull(headers[HttpConstants.HttpHeaders.PartitionKey]); Assert.IsNull(headers[HttpConstants.HttpHeaders.Continuation]); Assert.IsNull(headers[HttpConstants.HttpHeaders.RetryAfterInMilliseconds]); }
/// <summary> /// /// </summary> public void Dispose() { foreach (var _connection in _innerCacheRepository.Values) { if (null != _connection) { _connection.Dispose(); } } lock (_syncRoot) { _innerCacheRepository.Clear(); } }