Ejemplo n.º 1
0
        public void TestClear(HeaderType headerType)
        {
            INameValueCollection headers = this.CreateHeaders(headerType);

            headers[Key] = Guid.NewGuid().ToString();
            headers.Clear();
            Assert.IsNull(headers[Key]);
        }
Ejemplo n.º 2
0
        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]);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        public void Dispose()
        {
            foreach (var _connection in _innerCacheRepository.Values)
            {
                if (null != _connection)
                {
                    _connection.Dispose();
                }
            }

            lock (_syncRoot)
            {
                _innerCacheRepository.Clear();
            }
        }