示例#1
0
            public Type GetNodeType(MethodInfo method)
            {
                if (method.Name == nameof(ExtensionsDbFunctionsExtensions.ValueFromOpenJson))
                {
                    return(typeof(ValueFromOpenJsonExpressionNode));
                }

                return(_inner.GetNodeType(method));
            }
示例#2
0
        private Type GetNodeType(MethodCallExpression expressionToParse)
        {
            var nodeType = _nodeTypeProvider.GetNodeType(expressionToParse.Method);

            if (nodeType == null)
            {
                throw CreateParsingErrorException(
                          expressionToParse,
                          "This overload of the method '{0}.{1}' is currently not supported.",
                          expressionToParse.Method.DeclaringType.FullName,
                          expressionToParse.Method.Name);
            }
            return(nodeType);
        }
        private Type GetNodeType(MethodCallExpression expressionToParse)
        {
            var nodeType = _nodeTypeProvider.GetNodeType(expressionToParse.Method);

            if (nodeType == null)
            {
                string message = string.Format(
                    "Could not parse expression '{0}': This overload of the method '{1}.{2}' is currently not supported.",
                    FormattingExpressionTreeVisitor.Format(expressionToParse),
                    expressionToParse.Method.DeclaringType.FullName,
                    expressionToParse.Method.Name);
                throw new ParserException(message);
            }
            return(nodeType);
        }
示例#4
0
 public System.Type GetNodeType(MethodInfo method)
 {
     return(defaultNodeTypeProvider.GetNodeType(method));
 }
 public Type GetNodeType(MethodInfo method) => _nodeTypeProvider.GetNodeType(method);
示例#6
0
 public System.Type GetNodeType(MethodInfo method) => defaultNodeTypeProvider.GetNodeType(method);