コード例 #1
0
 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);
 }
コード例 #2
0
 protected override IEnumerable <MemberModel> GetMemberModels()
 => TypeVars.Concat <MemberModel>(NamedTuples).Concat(Classes).Concat(Functions).Concat(Variables);