Microsoft.Azure.WebJobs.Script.Binding.HttpRouteFactory.GetRouteParameters C# (CSharp) 메소드

GetRouteParameters() 공개 메소드

public GetRouteParameters ( string routeTemplate ) : IEnumerable
routeTemplate string
리턴 IEnumerable
        public IEnumerable<string> GetRouteParameters(string routeTemplate)
        {
            var routeBuilder = CreateRouteBuilder(routeTemplate);

            // this template will have any inline constraints parsed
            // out at this point
            return ParseRouteParameters(routeBuilder.Template);
        }

Usage Example

 public static void GetRouteParameters_ReturnsExpectedResult(string routeTemplate, string expected)
 {
     HttpRouteFactory routeFactory = new HttpRouteFactory("api");
     var parameters = routeFactory.GetRouteParameters(routeTemplate);
     var result = string.Join(",", parameters);
     Assert.Equal(expected, result);
 }