예제 #1
0
        /// <summary>
        /// Reset the number of cached requests and clear the entire cache
        /// Mostly used for testing
        /// </summary>
        public void ResetCache()
        {
            if (cache != null)
            {
                cache.Dispose();
            }

            cache = new SimpleCache(maxNumberOfCachedRequests);
            NumOfCachedRequests = 0;
        }
예제 #2
0
        /// <summary>
        /// Reset the number of cached requests and clear the entire cache
        /// Mostly used for testing
        /// </summary>
        public void ResetCache(int?newMaxNumberOfCachedRequests = null)
        {
            if (newMaxNumberOfCachedRequests != null && newMaxNumberOfCachedRequests.Value == maxNumberOfCachedRequests)
            {
                return;
            }

            if (cache != null)
            {
                cache.Dispose();
            }

            if (newMaxNumberOfCachedRequests != null)
            {
                maxNumberOfCachedRequests = newMaxNumberOfCachedRequests.Value;
            }
            cache = new SimpleCache(maxNumberOfCachedRequests);
            NumOfCachedRequests = 0;
        }
예제 #3
0
 public static void Destory()
 {
     _cache?.Dispose();
 }
예제 #4
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     clrPdbReader.Dispose();
 }