ningshuxia
2023-02-06 1fc0b4ed96d4c4b1ff7142926239998de32b2ada
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);
        }
    }
}