private static List <StructFieldInfo> ParseOffset(string text) { List <StructFieldInfo> list = new List <StructFieldInfo>(); StringReader sr = new StringReader(text); while (true) { string line = sr.ReadLine(); if (line == null) { break; } int offset = ReadOffset(line, out int offsetEndPos); if (offsetEndPos == -1 || offset == -1) { continue; } string name = ReadFieldName(line, offsetEndPos, out int nameEndPos); if (string.IsNullOrEmpty(name) == true || nameEndPos == -1) { continue; } string type = line.Substring(nameEndPos).Trim(); StructFieldInfo sfi = new StructFieldInfo(offset, name, type); list.Add(sfi); } return(list); }
public override bool Equals(object obj) { StructFieldInfo target = (StructFieldInfo)obj; if (target.Name == this.Name) { return(true); } return(false); }