private void CacheCheck() { lock (this.syncObject) if (this.modifiedTypeCache == null) { this.modifiedTypeCache = new TypeModifiedCache(); } }
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)); } }
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); }