예제 #1
0
        public static string Action <T>(UrlHelper urlHelper,
                                        MemberExpression actionExpression)
            where T : Controller
        {
            var actionName = actionExpression.Member.Name;

            return(UrlHelperUtilities.Action <T>(urlHelper,
                                                 actionName));
        }
        public static string Action <T>(UrlHelper urlHelper,
                                        Expression <Func <T, string> > actionNameExpression)
            where T : Controller
        {
            var actionNameFunction = actionNameExpression.Compile();
            var actionName         = actionNameFunction(default(T));

            return(UrlHelperUtilities.Action <T>(urlHelper,
                                                 actionName));
        }
예제 #3
0
        public static string Action <T>(UrlHelper urlHelper,
                                        MemberExpression actionExpression,
                                        RouteValueDictionary routeValues)
            where T : Controller
        {
            var actionName = actionExpression.Member.Name;

            return(UrlHelperUtilities.Action <T>(urlHelper,
                                                 actionName,
                                                 routeValues));
        }
예제 #4
0
        public static string Action <T>(UrlHelper urlHelper,
                                        MemberExpression actionExpression,
                                        object routeValues,
                                        string protocol)
            where T : Controller
        {
            var actionName = actionExpression.Member.Name;

            return(UrlHelperUtilities.Action <T>(urlHelper,
                                                 actionName,
                                                 routeValues,
                                                 protocol));
        }
        public static string Action <T>(UrlHelper urlHelper,
                                        Expression <Func <T, string> > actionNameExpression,
                                        RouteValueDictionary routeValues,
                                        string protocol)
            where T : Controller
        {
            var actionNameFunction = actionNameExpression.Compile();
            var actionName         = actionNameFunction(default(T));

            return(UrlHelperUtilities.Action <T>(urlHelper,
                                                 actionName,
                                                 routeValues,
                                                 protocol));
        }