private static bool TryParseOperationParameters(string functionName, string parenthesisExpression, IEdmOperation operation, out ICollection <OperationSegmentParameter> parsedSegementParameters, bool enableUriTemplateParsing = false) { ICollection <FunctionParameterToken> splitParameters; parsedSegementParameters = null; ODataUriParserConfiguration configuration = new ODataUriParserConfiguration(HardCodedTestModel.TestModel) { EnableUriTemplateParsing = enableUriTemplateParsing }; if (FunctionParameterParser.TrySplitOperationParameters(parenthesisExpression, configuration, out splitParameters)) { parsedSegementParameters = FunctionCallBinder.BindSegmentParameters(configuration, operation, splitParameters); return(true); } return(false); }
private static bool TryParseFunctionParameters(ExpressionLexer lexer, ParameterAliasValueAccessor paramAliasAccessor, out ICollection <NamedFunctionParameterNode> parsedParameterNodes) { UriQueryExpressionParser parser = new UriQueryExpressionParser(345, lexer); ICollection <FunctionParameterToken> splitParameters; parsedParameterNodes = null; if (parser.TrySplitFunctionParameters(out splitParameters)) { var parsedParameters = FunctionCallBinder.BindSegmentParameters(new ODataUriParserConfiguration(HardCodedTestModel.TestModel) { ParameterAliasValueAccessor = paramAliasAccessor }, HardCodedTestModel.GetFunctionImportIsAddressGood().Function, splitParameters); parsedParameterNodes = parsedParameters.Select(s => new NamedFunctionParameterNode(s.Name, s.Value as QueryNode)).ToList(); return(true); } return(false); }
private static bool TryParseOperationParameters(string functionName, string parenthesisExpression, ParameterAliasValueAccessor paramAliasAccessor, IEdmOperation operation, out ICollection <OperationSegmentParameter> parsedSegementParameters) { ICollection <FunctionParameterToken> splitParameters; parsedSegementParameters = null; ODataUriParserConfiguration configuration = new ODataUriParserConfiguration(HardCodedTestModel.TestModel) { ParameterAliasValueAccessor = paramAliasAccessor, EnableCaseInsensitiveUriFunctionIdentifier = false }; if (FunctionParameterParser.TrySplitOperationParameters(parenthesisExpression, configuration, out splitParameters)) { parsedSegementParameters = FunctionCallBinder.BindSegmentParameters(configuration, operation, splitParameters); return(true); } return(false); }