Пример #1
0
 /// <summary>
 /// Transfers the request to url from IUrlRegistry.UrlFor(destination)
 /// </summary>
 /// <param name="destination"></param>
 /// <returns></returns>
 public static TModel To(object destination)
 {
     return(new TModel()
     {
         RedirectTo = FubuContinuation.TransferTo(destination)
     });
 }
Пример #2
0
 /// <summary>
 /// Transfers the request to the url from IUrlRegistry.UrlFor<TActionHandler>(method)
 /// </summary>
 /// <typeparam name="TActionHandler"></typeparam>
 /// <param name="method"></param>
 /// <returns></returns>
 public static TModel To <TActionHandler>(Expression <Action <TActionHandler> > method)
 {
     return(new TModel()
     {
         RedirectTo = FubuContinuation.TransferTo(method)
     });
 }
Пример #3
0
        public FubuContinuation FindContinuation()
        {
            var redirectable = _request.Find <IRedirectable>().FirstOrDefault();

            if (redirectable != null)
            {
                return(redirectable.RedirectTo ?? FubuContinuation.NextBehavior());
            }

            return(_request.Get <FubuContinuation>());
        }
Пример #4
0
 public void Continue(FubuContinuation continuation, IActionBehavior nextBehavior)
 {
     _handler.InsideBehavior = nextBehavior;
     continuation.Process(_handler);
 }
Пример #5
0
 public static TModel With(HttpStatusCode code)
 {
     return(new TModel {
         RedirectTo = FubuContinuation.EndWithStatusCode(code)
     });
 }