コード例 #1
0
        public string UrlFor(object model, string categoryOrHttpMethod = null)
        {
            var url = _inner.UrlFor(model, categoryOrHttpMethod);

            _cache.Enqueue(url);

            return(_currentRequest.ToRelativeUrl(_directories, url));
        }
コード例 #2
0
 public void retrieve_by_controller_action_even_if_it_has_an_input_model()
 {
     urls.UrlFor <OneController>(x => x.M1(null)).ShouldEqual("one/m1");
 }
コード例 #3
0
        public void find_by_handler_type_if_only_one_method()
        {
            graph.Actions().Each(x => Debug.WriteLine(x.Description));

            urls.UrlFor <OnlyOneActionController>()
            .ShouldEqual("http://server/fubu/onlyoneaction/go");
        }
コード例 #4
0
 public void find_by_handler_type_if_only_one_method()
 {
     urls.UrlFor <OnlyOneActionController>()
     .ShouldBe("/onlyoneaction/go");
 }
コード例 #5
0
 public void forward_without_a_category()
 {
     graph.Forward <Model4>(m => new Model3());
     urls.UrlFor(new Model4()).ShouldEqual("/one/m5");
 }