public override MemberModel GetModel(string name) { if (_modelCache == null) { var models = TypeVars.Concat <MemberModel>(NamedTuples).Concat(Classes).Concat(Functions).Concat(Variables); _modelCache = new Dictionary <string, MemberModel>(); foreach (var m in models) { Debug.Assert(!_modelCache.ContainsKey(m.Name)); _modelCache[m.Name] = m; } } return(_modelCache.TryGetValue(name, out var model) ? model : null); }
protected override IEnumerable <MemberModel> GetMemberModels() => TypeVars.Concat <MemberModel>(NamedTuples).Concat(Classes).Concat(Functions).Concat(Variables);