Microsoft.CSharp.RuntimeBinder.Semantics.EXPR.getArgs C# (CSharp) Method

getArgs() public method

public getArgs ( ) : EXPR
return EXPR
        public EXPR getArgs()
        {
            RETAILVERIFY(this.isCALL() || this.isPROP() || this.isFIELD() || this.isARRAYINDEX());
            if (this.isFIELD())
                return null;
            switch (kind)
            {
                case ExpressionKind.EK_CALL:
                    return this.asCALL().GetOptionalArguments();

                case ExpressionKind.EK_PROP:
                    return this.asPROP().GetOptionalArguments();

                case ExpressionKind.EK_ARRAYINDEX:
                    return this.asARRAYINDEX().GetIndex();
            }
            Debug.Assert(false, "Shouldn't get here without a CALL, PROP, FIELD or ARRINDEX");
            return null;
        }

Usage Example

コード例 #1
0
ファイル: ExpressionBinder.cs プロジェクト: dotnet/corefx
        protected void verifyMethodArgs(EXPR call, CType callingObjectType)
        {
            Debug.Assert(call.isCALL() || call.isPROP());

            EXPR argsPtr = call.getArgs();
            SymWithType swt = call.GetSymWithType();
            MethodOrPropertySymbol mp = swt.Sym.AsMethodOrPropertySymbol();
            TypeArray pTypeArgs = call.isCALL() ? call.asCALL().mwi.TypeArgs : null;
            EXPR newArgs;
            AdjustCallArgumentsForParams(callingObjectType, swt.GetType(), mp, pTypeArgs, argsPtr, out newArgs);
            call.setArgs(newArgs);
        }