Пример #1
0
        // ENDSAMPLE


        // SAMPLE: LookupByInputType
        public static void LookupByInputType(IUrlRegistry urls)
        {
            // Find the url that would handle the CreateUser
            // type as a request body that responds to "PUT"
            var url = urls.UrlForType <CreateUser>("PUT");

            // Look up the Url if you already have the request
            // body
            var input = new CreateUser();
            var url2  = urls.UrlFor(input);
        }
Пример #2
0
 public string UrlFor <T>(string method)
 {
     return(_urls.UrlForType <T>(method));
 }