internal override InvalidInfo AccumUsedTypeDefs(ValidityContext vctxt, MessageContext ctxt, Set <QualifiedTypeName> usedTypes) { if (!name.IsResolvable(vctxt.Global, vctxt.Log, ctxt)) { return(new InvalidInfo(MessageContextBuilders.Type(vctxt.Global, this))); } usedTypes.Add(name); return(arguments.Select(a => a.AccumUsedTypeDefs(vctxt, ctxt, usedTypes)).FirstOrDefault (v => v != null)); }
public bool IsResolvable(Global global, Log log, MessageContext ctxt) { if (!DefiningType.IsResolvable(global, log, ctxt)) { return(false); } var assemblyDef = default(AssemblyDef); var typeDef = default(TypeDef); if (!DefiningType.PrimTryResolve(global, out assemblyDef, out typeDef)) { return(false); } var memberDef = typeDef.ResolveMember(Signature); if (memberDef == null) { log(new InvalidMemberName(ctxt, this, "Type does not contain a definition for member")); return(false); } return(true); }