Пример #1
0
        public ExprMethodInfo CreateMethodInfo(MethodSymbol method, AggregateType methodType, TypeArray methodParameters)
        {
            Debug.Assert(method != null);
            Debug.Assert(methodType != null);
            ExprMethodInfo methodInfo = new ExprMethodInfo(
                GetTypes().GetOptPredefAgg(method.IsConstructor() ? PredefinedType.PT_CONSTRUCTORINFO : PredefinedType.PT_METHODINFO).getThisType());

            methodInfo.Method = new MethWithInst(method, methodType, methodParameters);
            return(methodInfo);
        }
Пример #2
0
        public ExprMethodInfo CreateMethodInfo(MethodSymbol method, AggregateType methodType, TypeArray methodParameters)
        {
            Debug.Assert(method != null);
            Debug.Assert(methodType != null);
            ExprMethodInfo methodInfo = new ExprMethodInfo();
            CType          type;

            if (method.IsConstructor())
            {
                type = GetTypes().GetOptPredefAgg(PredefinedType.PT_CONSTRUCTORINFO).getThisType();
            }
            else
            {
                type = GetTypes().GetOptPredefAgg(PredefinedType.PT_METHODINFO).getThisType();
            }

            methodInfo.Kind   = ExpressionKind.EK_METHODINFO;
            methodInfo.Type   = type;
            methodInfo.Flags  = 0;
            methodInfo.Method = new MethWithInst(method, methodType, methodParameters);
            return(methodInfo);
        }
Пример #3
0
 protected virtual Expr VisitMETHODINFO(ExprMethodInfo pExpr)
 {
     return(VisitEXPR(pExpr));
 }