getAttributeInfo(ILElementIterator allIter) { ILCustomElement cusElem = allIter.getNext() as ILCustomElement; if (null == cusElem) { return(null); } //TODO: Eigentlich müsste der Fall berücksichtigt werden, // wenn ein Feld mehrere Attribute hat. return(cusElem.getAttributeInfo()); }
resolve() { /* * .assembly extern System.Data { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) .ver 2:0:0:0 } * */ if (null != m_name) { return; } ILElementIterator it = this.getAllIterator(false); ILElement el; Regex regex = new Regex(@"\.ver\s([\d:]+)"); Match match; for (el = it.getFirst(); el != null; el = it.getNext()) { match = regex.Match(el.getAllLines()); if (match.Success) { versionString = match.Groups[1].Value; regex = new Regex(@"(\d+):(\d+):(\d+):(\d+)"); match = regex.Match(versionString); major = int.Parse(match.Groups[1].Value); minor = int.Parse(match.Groups[2].Value); build = int.Parse(match.Groups[3].Value); revision = int.Parse(match.Groups[4].Value); } } string line = this.getAllLines(); regex = new Regex(@"\.assembly\s+(extern|)"); match = regex.Match(line); if (match.Groups[1].Value != string.Empty) { m_extern = true; } string s = line.Substring(match.Length).Trim(); EcmaDottedName dn = new EcmaDottedName(); dn.Parse(s); this.m_name = dn.Content; }