Ejemplo n.º 1
0
        public override ParameterInfo[] GetIndexParameters()
        {
            CachePropertyInfo(PInfo.GetMethod | PInfo.SetMethod);
            ParameterInfo[] src;
            int             length;

            if (info.get_method != null)
            {
                src    = info.get_method.GetParametersInternal();
                length = src.Length;
            }
            else if (info.set_method != null)
            {
                src    = info.set_method.GetParametersInternal();
                length = src.Length - 1;
            }
            else
            {
                return(EmptyArray <ParameterInfo> .Value);
            }

            var dest = new ParameterInfo [length];

            for (int i = 0; i < length; ++i)
            {
                dest [i] = ParameterInfo.New(src [i], this);
            }
            return(dest);
        }
Ejemplo n.º 2
0
 static internal ParameterInfo GetReturnParameterInfo(MonoMethod method)
 {
     return(ParameterInfo.New(GetReturnType(method.mhandle), method, get_retval_marshal(method.mhandle)));
 }