public EnvCacheFile CacheFileCreate() {
   EnvCacheFile ecf = new EnvCacheFile(this);
   DbRetVal ret;
   // lock environement first, to avoid deadlocks
   lock (rscLock) {
     ret = CacheFileCreate(ecf, 0);
   }
   Util.CheckRetVal(ret);
   return ecf;
 }
 // requires synchronization lock on rscLock
 internal bool RemoveCacheFile(EnvCacheFile mpf) {
   return cacheFiles.Remove(mpf);
 }
 DbRetVal CacheFileCreate(EnvCacheFile ecf, int flags) {
   DbRetVal ret;
   RuntimeHelpers.PrepareConstrainedRegions();
   try { }
   finally {
     DB_MPOOLFILE* mpf;
     DB_ENV* evp = CheckDisposed();
     ret = evp->MemPoolFileCreate(evp, out mpf, unchecked((UInt32)flags));
     if (ret == DbRetVal.SUCCESS) {
       ecf.mpf = mpf; ;
       cacheFiles.Insert(ecf);
     }
   }
   return ret;
 }