Exemplo 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);
            }
        }
Exemplo n.º 2
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);
        }
      }
Exemplo n.º 3
0
 internal ActionInfo(ActionGroupInfo group, MethodInfo method)
 {
     Group     = group;
     Method    = method;
     Attribute = method.GetCustomAttribute(typeof(ActionAttribute), false) as ActionAttribute;
 }
Exemplo n.º 4
0
 internal ActionInfo(ActionGroupInfo group, MethodInfo method)
 {
     Group = group;
     Method = method;
     Attribute = method.GetCustomAttribute(typeof(ActionAttribute), false) as ActionAttribute;
 }