Example #1
0
        private void LoadMethodSemantics()
        {
            m_semanticsMap = (
                from row in PEFile.GetRowsSafe(MetadataTable.MethodSemantics)
                let table = ((MethodSemanticsRow *)row)->GetAssosication(PEFile).Table
                            orderby table
                            group row by(ZeroBasedIndex)((MethodSemanticsRow *)row)->GetMethodIndex(PEFile)
                ).ToDictionary(x => x.Key, x => x.ToList().AsReadOnly() as IReadOnlyList <IntPtr>).AsReadOnly();

            m_inverseSemanticsMap = (
                from row in PEFile.GetRowsSafe(MetadataTable.MethodSemantics)
                group row by((MethodSemanticsRow *)row)->GetAssosication(PEFile)
                ).ToDictionary(x => x.Key, x => x.ToList().AsReadOnly() as IReadOnlyList <IntPtr>).AsReadOnly();
        }
Example #2
0
 private void LoadGenericParameterRows()
 {
     if (m_genericParameterRows == null)
     {
         lock (m_lockObject) {
             if (m_genericParameterRows == null)
             {
                 m_genericParameterRows = (
                     from p in PEFile.GetRowsSafe(MetadataTable.GenericParam)
                     group p by((GenericParameterRow *)p)->GetOwner(PEFile)
                     ).ToDictionary(x => x.Key, x => x.ToList().AsReadOnly() as IReadOnlyList <IntPtr>);
             }
         }
     }
 }