/// <inheritdoc />
        public override bool TryMatch(ODataPathSegment pathSegment, IDictionary <string, object> values)
        {
            if (pathSegment.SegmentKind == ODataSegmentKinds.Function)
            {
                BoundFunctionPathSegment functionSegment = (BoundFunctionPathSegment)pathSegment;
                if (FunctionName == functionSegment.FunctionName)
                {
                    var enumNames = functionSegment.Function.Parameters.Where(p => p.Type.IsEnum()).Select(p => p.Name);
                    if (KeyValuePathSegmentTemplate.TryMatch(ParameterMappings, functionSegment.Values, values,
                                                             enumNames))
                    {
                        foreach (KeyValuePair <string, string> nameAndValue in functionSegment.Values)
                        {
                            string name  = nameAndValue.Key;
                            object value = functionSegment.GetParameterValue(name);

                            //ProcedureRoutingConventionHelpers.AddFunctionParameters(functionSegment.Function, name,
                            //    value, values, values, ParameterMappings);
                            throw new NotImplementedException("ProcedureRoutingConventionHelpers.AddFunctionParameters");
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BoundFunctionPathSegmentTemplate"/> class.
        /// </summary>
        /// <param name="function">The function segment to be templatized</param>
        public BoundFunctionPathSegmentTemplate(BoundFunctionPathSegment function)
        {
            if (function == null)
            {
                throw Error.ArgumentNull("function");
            }

            FunctionName      = function.FunctionName;
            ParameterMappings = KeyValuePathSegmentTemplate.BuildParameterMappings(function.Values, function.ToString());
        }