public void LoadData(CLIFile pFile) { int token = 0; if (pFile.FieldTable.Length > MemberForwardedTypeMax16BitRows || pFile.MethodDefTable.Length > MemberForwardedTypeMax16BitRows) { token = pFile.ReadInt32(); } else { token = pFile.ReadUInt16(); } Type = (MemberForwardedType)(token & MemberForwardedTypeMask); token = (token >> MemberForwardedTypeBits) - 1; if (token >= 0) { switch (Type) { case MemberForwardedType.Field: Field = pFile.FieldTable[token]; break; case MemberForwardedType.MethodDef: MethodDef = pFile.MethodDefTable[token]; break; default: throw new BadImageFormatException("MemberForwarded Type"); } } }
public void LoadData(CLIFile pFile) { int token = 0; if (pFile.FieldTable.Length > MemberForwardedTypeMax16BitRows || pFile.MethodDefTable.Length > MemberForwardedTypeMax16BitRows) token = pFile.ReadInt32(); else token = pFile.ReadUInt16(); Type = (MemberForwardedType)(token & MemberForwardedTypeMask); token = (token >> MemberForwardedTypeBits) - 1; if (token >= 0) { switch (Type) { case MemberForwardedType.Field: Field = pFile.FieldTable[token]; break; case MemberForwardedType.MethodDef: MethodDef = pFile.MethodDefTable[token]; break; default: throw new BadImageFormatException("MemberForwarded Type"); } } }