コード例 #1
0
        /// <summary>
        /// Creates a LookupManager for a given ILookup type
        /// </summary>
        public LookupManager()
        {
            _lookupRetriever = new DbLookupRetriever <T>();
            _lookupMutator   = new DbLookupMutator <T>();

            if (SimpleLookups.Configuration.EnableCaching)
            {
                _lookupRetriever = new CacheLookupRetriever <T>(_lookupRetriever);
            }
        }
コード例 #2
0
 // We need an instance of DbLookupRetriever and an instance of LookupCache
 internal CacheLookupRetriever(ILookupRetriever <T> backupLookupRetriever)
 {
     _backupLookupRetriever = backupLookupRetriever;
     _lookupCache           = LookupCache.Instance;
 }