public bool Contains(Type expectType, bool promote = false) { if (expectType == null) { throw new ArgumentNullException(nameof(expectType)); } return(CacheType.ContainsKey(expectType) || (this._hasParent && promote && this.Parent.Contains(expectType, promote))); }