Esempio n. 1
0
 public NRefactory.TypeSystem.IType ResolveType(NRefactory.VB.Ast.AstType type, NRefactory.VB.Ast.TypeDeclaration entity = null)
 {
     /*
      * var annotation = type.Annotation<TypeReference>();
      * if (annotation == null )
      *      return null;
      *
      * IEntity current = null;
      * if (entity != null) {
      *      var typeInfo = entity.Annotation<TypeReference>();
      *      current = loader.ReadTypeReference(typeInfo).Resolve(context).GetDefinition();
      * }
      *
      * return loader.ReadTypeReference(annotation, entity: current).Resolve(context);*/
     return(SpecialType.UnknownType);
 }
Esempio n. 2
0
        public IType ResolveType(NRefactory.VB.Ast.AstType type, NRefactory.VB.Ast.TypeDeclaration entity = null)
        {
            var annotation = type.Annotation <TypeReference>();

            if (annotation == null)
            {
                return(null);
            }

            IEntity current = null;

            if (entity != null)
            {
                var typeInfo = entity.Annotation <TypeReference>();
                current = loader.ReadTypeReference(typeInfo).Resolve(context).GetDefinition();
            }

            return(loader.ReadTypeReference(annotation, entity: current).Resolve(context));
        }