예제 #1
0
 public InteropManager(CompilerEnvironment env)
 {
     this.env = env;
     rootEnv = env.Global.Environment();
     attributeHelper = env.AttributeHelper;
     typeRepresentationCache = new Map<CST.QualifiedTypeName, TypeRepresentation>();
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }