Пример #1
0
        internal MethodInfo Method_GetInfo(long id)
        {
            var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_INFO, new PacketWriter ().WriteId (id));

            MethodInfo info = new MethodInfo ();
            info.attributes = res.ReadInt ();
            info.iattributes = res.ReadInt ();
            info.token = res.ReadInt ();
            if (Version.AtLeast (2, 12)) {
                int attrs = res.ReadByte ();
                if ((attrs & (1 << 0)) != 0)
                    info.is_gmd = true;
                if ((attrs & (1 << 1)) != 0)
                    info.is_generic_method = true;
                info.gmd = res.ReadId ();
                if (Version.AtLeast (2, 15)) {
                    if (info.is_generic_method) {
                        int n = res.ReadInt ();
                        info.type_args = res.ReadIds (n);
                    }
                }
            }
            return info;
        }
Пример #2
0
		internal MethodInfo Method_GetInfo (long id) {
			var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_INFO, new PacketWriter ().WriteId (id));

			MethodInfo info = new MethodInfo ();
			info.attributes = res.ReadInt ();
			info.iattributes = res.ReadInt ();
			info.token = res.ReadInt ();

			return info;
		}