コード例 #1
0
 private void CacheCheck()
 {
     lock (this.syncObject)
         if (this.modifiedTypeCache == null)
         {
             this.modifiedTypeCache = new TypeModifiedCache();
         }
 }
コード例 #2
0
 private void CacheCheck()
 {
     lock (this.syncObject)
         if (this.modifiedTypeCache == null)
         {
             this.modifiedTypeCache = new TypeModifiedCache();
         }
     if (this.arrayCache == null)
     {
         this.arrayCache = new TypeArrayCache(this, k => new ArrayType(this, k, this.manager), (lowerBounds, lengths) => new ArrayType(this, this.manager, lowerBounds, lengths));
     }
 }
コード例 #3
0
            public TypeModifiedCache GetModifiedTypeCache(IType target)
            {
                if (target is _IType)
                {
                    return((target as _IType).ModifiedTypeCache);
                }
                TypeModifiedCache result;

                lock (modifiedCache)
                    if (!modifiedCache.TryGetValue(target, out result))
                    {
                        modifiedCache.Add(target, result = new TypeModifiedCache());
                    }
                return(result);
            }