コード例 #1
0
        private static string ExpressionToString(Type modelType, Expression expression)
        {
            var data = KnockoutExpressionData.CreateConstructorData();

            data.Aliases[modelType.FullName] = "this";
            return(KnockoutExpressionConverter.Convert(expression, data));
        }
コード例 #2
0
        private static string GetGetExpression(Type modelType, object model, MethodInfo method)
        {
            var expression = method.Invoke(model, null) as Expression;
            var data       = KnockoutExpressionData.CreateConstructorData();

            data.Aliases[modelType.FullName] = "this";
            return(KnockoutExpressionConverter.Convert(expression, data));
        }