LoginSignup
0
1

More than 5 years have passed since last update.

elfsharp > ELF.cs > TryGetSectionInner(string name, out Section<T> section)

Last updated at Posted at 2015-08-21

GetSection()で使われているTryGetSetionInner()の実装。

elfsharp/ELFSharp/ELF/ELF.cs

private GetSectionResult TryGetSectionInner(string name, out Section<T> section)
        {
            section = default(Section<T>);
            if(!HasSectionsStringTable)
            {
                return GetSectionResult.NoSectionsStringTable;
            }
            int index;
            if(!sectionIndicesByName.TryGetValue(name, out index))
            {
                return GetSectionResult.NoSuchSection;
            }
            if(index == SectionNameNotUniqueMarker)
            {
                return GetSectionResult.SectionNameNotUnique;
            }
            return TryGetSectionInner(index, out section);
        }
  1. sectionIndicesByName.TryGetValue()でindexを取得する。
  2. TryGetSectionInner(index, out section)でsectionを取得する。
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1