Exemplo n.º 1
0
        internal ActionGroupInfo(ControllerInfo controller, string actionInvocationName)
        {
            Controller = controller;
            m_Name = actionInvocationName;

            var allmi = controller.GetAllActionMethods()
                              .Where(mi => ControllerInfo.GetInvocationName(mi).Equals(actionInvocationName, StringComparison.InvariantCultureIgnoreCase));

            var actions = new List<ActionInfo>();

            foreach(var mi in allmi)
              actions.Add(new ActionInfo(this, mi));

            Actions = actions.OrderBy( ai => ai.Attribute.Order );

            //warm-up for possible errors
            foreach(var ai in actions)
            {
              var matches = ai.Attribute.Matches;//cause matches script to load, and bubble exceptions if it contains any
            }
        }
Exemplo n.º 2
0
        internal ActionGroupInfo(ControllerInfo controller, string actionInvocationName)
        {
            Controller = controller;
            m_Name     = actionInvocationName;

            var allmi = controller.GetAllActionMethods()
                        .Where(mi => ControllerInfo.GetInvocationName(mi).Equals(actionInvocationName, StringComparison.InvariantCultureIgnoreCase));
            var actions = new List <ActionInfo>();

            Actions = actions;
            foreach (var mi in allmi)
            {
                actions.Add(new ActionInfo(this, mi));
            }

            actions.OrderBy(ai => ai.Attribute.Order);

            //warm-up for possible errors
            foreach (var ai in actions)
            {
                var matches = ai.Attribute.Matches;//cause matches script to load, and bubble exceptions if it contains any
            }
        }