Ejemplo n.º 1
0
        public ControllerInfo(Type type)
        {
            string aname = null;

            try
            {
                Type   = type;
                m_Name = TypeToKeyName(type);
                var groups = new Registry <ActionGroupInfo>();
                Groups = groups;

                var allmi = GetAllActionMethods();

                foreach (var mi in allmi)
                {
                    var iname = GetInvocationName(mi);
                    aname = iname;
                    var agi = groups[iname];
                    if (agi == null)
                    {
                        agi = new ActionGroupInfo(this, iname);
                        groups.Register(agi);
                    }
                    aname = null;
                }
            }
            catch (Exception error)
            {
                throw new WaveException(StringConsts.MVC_CONTROLLER_REFLECTION_ERROR.Args(type.FullName, aname, error.ToMessageWithType()), error);
            }
        }
Ejemplo n.º 2
0
 internal ActionInfo(ActionGroupInfo group, MethodInfo method)
 {
     Group     = group;
     Method    = method;
     Attribute = method.GetCustomAttribute(typeof(ActionBaseAttribute), false) as ActionBaseAttribute;
 }
Ejemplo n.º 3
0
 internal ActionInfo(ActionGroupInfo group, MethodInfo method, ActionBaseAttribute atr)
 {
     Group     = group;
     Method    = method;
     Attribute = atr;
 }