コード例 #1
0
 public void CacheDependent(IDependentObject obj)
 {
     if (obj is null)
     {
         throw new ArgumentNullException(nameof(obj));
     }
     _cache.CacheDependent(obj);
 }
コード例 #2
0
        public void Cache_One_CanBeFound()
        {
            var cachedComponent = new DependentComponentAlone();

            _cache.CacheDependent(cachedComponent);

            Assert.IsTrue(_cache.TryFind <DependentComponentAlone>(out var retrievedComponent));
            Assert.AreEqual(cachedComponent, retrievedComponent);
        }