ningshuxia
2025-04-03 4917fb959e2befec07a693e72d7010c09494ec7c
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
using System.Linq;
 
namespace IStation
{
    internal sealed partial class SharedMemoryCache
    {
        /// <summary>
        /// Check to see if the memory cache is empty of keys
        /// </summary>
        /// <returns>Returns true if there are no keys</returns>
        public bool IsEmpty()
        {
            return !_memoryCache.Any();
        }
 
        /// <summary>
        /// Check to see if a key exists
        /// </summary>
        /// <param name="key"></param>
        /// <returns>Returns true if the key does not exist</returns>
        internal bool IsEmpty(string key)
        {
            return !HasKey(key);
        }
    }
}