public InteropManager(CompilerEnvironment env) { this.env = env; rootEnv = env.Global.Environment(); attributeHelper = env.AttributeHelper; typeRepresentationCache = new Map<CST.QualifiedTypeName, TypeRepresentation>(); }
public override CST.InvalidInfo ImplementableMemberRef(MessageContext ctxt, CST.RootEnvironment rootEnv, CST.MemberRef memberRef) { if (memberRef.DefiningType.Style(rootEnv) is CST.DelegateTypeStyle && memberRef.Name.Equals(".ctor", StringComparison.Ordinal)) { // SPECIAL CASE: Delegates are constructed by runtime, so assume .ctor is implementable return(null); } return(null); }
public override CST.InvalidInfo ImplementableTypeRef(MessageContext ctxt, CST.RootEnvironment rootEnv, CST.TypeRef typeRef) { var s = typeRef.Style(rootEnv); if (s is CST.UnmanagedPointerTypeStyle) { Log(new CST.InvalidTypeRef(ctxt, typeRef, "Unmanaged pointers are not supported")); return(new CST.InvalidInfo(CST.MessageContextBuilders.Type(Global, typeRef))); } return(null); }