private byte GetDefaultIndex(MetaDataTableGroup tablegroup) { foreach (MetaDataTable table in tablegroup.tables) if (table != null && table.IsLarge(tablegroup.bits)) return sizeof(uint); return sizeof(ushort); }
private ValueType GetMemberIndex(Workspace workspace, MetaDataTableGroup group, MetaDataMember member) { if (group.IsLarge) return group.GetCodedIndex(member); return (ushort)group.GetCodedIndex(member); }
internal void SetupCodedIndexes() { TypeDefOrRef = new MetaDataTableGroup(3, 2); HasConstant = new MetaDataTableGroup(3, 2); HasCustomAttribute = new MetaDataTableGroup(22, 5); HasFieldMarshall = new MetaDataTableGroup(2, 1); HasDeclSecurity = new MetaDataTableGroup(3, 2); MemberRefParent = new MetaDataTableGroup(5, 3); HasSemantics = new MetaDataTableGroup(2, 1); MethodDefOrRef = new MetaDataTableGroup(2, 1); MemberForwarded = new MetaDataTableGroup(2, 1); Implementation = new MetaDataTableGroup(3, 2); CustomAttributeType = new MetaDataTableGroup(5, 3); ResolutionScope = new MetaDataTableGroup(4, 2); TypeOrMethod = new MetaDataTableGroup(2, 1); }