Shuxia Ning
2024-11-06 adf8dc1c7cae1b12f486dcdb3d7daf4a5a59ec52
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 !this._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 !this.HasKey(key);
        }
    }
}