コード例 #1
0
        public IMemberBind GetMember(string name, params object[] arguments)
        {
            IObjectBind getter = null;
              MethodInfo getMethod = FindMethod("get_" + name);
              if (getMethod != null)
            getter = new LateBoundMethod(getMethod, Target);

              IObjectBind setter = null;
              MethodInfo setMethod = FindMethod("set_" + name);
              if (setMethod != null)
            setter = new LateBoundMethod(setMethod, Target);

              return new InterfaceMember(getter, setter, Target);
        }
コード例 #2
0
        public IMemberBind GetMember(string name, params object[] arguments)
        {
            IObjectBind getter    = null;
            MethodInfo  getMethod = FindMethod("get_" + name);

            if (getMethod != null)
            {
                getter = new LateBoundMethod(getMethod, Target);
            }

            IObjectBind setter    = null;
            MethodInfo  setMethod = FindMethod("set_" + name);

            if (setMethod != null)
            {
                setter = new LateBoundMethod(setMethod, Target);
            }

            return(new InterfaceMember(getter, setter, Target));
        }