コード例 #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);
            }
        }
コード例 #2
0
ファイル: Reflection.cs プロジェクト: sergey-msu/nfx
      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);
        }
      }
コード例 #3
0
 internal ActionInfo(ActionGroupInfo group, MethodInfo method)
 {
     Group     = group;
     Method    = method;
     Attribute = method.GetCustomAttribute(typeof(ActionAttribute), false) as ActionAttribute;
 }
コード例 #4
0
ファイル: Reflection.cs プロジェクト: itadapter/nfx
 internal ActionInfo(ActionGroupInfo group, MethodInfo method)
 {
     Group = group;
     Method = method;
     Attribute = method.GetCustomAttribute(typeof(ActionAttribute), false) as ActionAttribute;
 }