CheckTypeVersion() 정적인 개인적인 메소드

static private CheckTypeVersion ( Expression tested, int version ) : MethodCallExpression
tested Expression
version int
리턴 MethodCallExpression
예제 #1
0
        internal static ValidationInfo /*!*/ GetValidationInfo(params DynamicMetaObject /*!*/[] /*!*/ args)
        {
            Expression typeTest = null;

            for (int i = 0; i < args.Length; i++)
            {
                if (args[i].HasValue)
                {
                    IPythonObject val = args[i].Value as IPythonObject;
                    if (val != null)
                    {
                        Expression test = BindingHelpers.CheckTypeVersion(
                            AstUtils.Convert(args[i].Expression, val.GetType()),
                            val.PythonType.Version
                            );

                        test = Ast.AndAlso(
                            Ast.TypeEqual(args[i].Expression, val.GetType()),
                            test
                            );

                        if (typeTest != null)
                        {
                            typeTest = Ast.AndAlso(typeTest, test);
                        }
                        else
                        {
                            typeTest = test;
                        }
                    }
                }
            }

            return(new ValidationInfo(typeTest));
        }