Пример #1
0
 private TypeMapping TypeMappingFor(CST.AssemblyDef assemblyDef, CST.TypeDef typeDef)
 {
     var name = typeDef.QualifiedTypeName(env.Global, assemblyDef);
     var typeMapping = default(TypeMapping);
     if (!typeMappingCache.TryGetValue(name, out typeMapping))
     {
         typeMapping = new TypeMapping(env, assemblyDef, typeDef);
         typeMappingCache.Add(name, typeMapping);
     }
     return typeMapping;
 }
Пример #2
0
        // ----------------------------------------------------------------------
        // Types
        // ----------------------------------------------------------------------

        public TypeRepresentation GetTypeRepresentation(CST.AssemblyDef assemblyDef, CST.TypeDef typeDef)
        {
            var name = typeDef.QualifiedTypeName(env.Global, assemblyDef);
            var res = default(TypeRepresentation);
            if (!typeRepresentationCache.TryGetValue(name, out res))
            {
                res = MakeTypeRepresentation(assemblyDef, typeDef);
                typeRepresentationCache.Add(name, res);
            }
            return res;
        }