private void ParseLinkedAliases(string jsonString) { Regex matcher = new Regex("\"([A-z|_|-]+\\:[\\S]*)\""); foreach (Match match in matcher.Matches(jsonString)) { string fullAlias = match.Groups[1].Value; ModuleFile linkedAlias = ModuleDataManager.GetInstance().GetModuleFile(fullAlias); if (linkedAlias == null) { continue; } LinkedAliases.Add(linkedAlias); linkedAlias.AddReference(GetAliasOrFlatName(), this); } }
#pragma warning disable SA1202 // Elements must be ordered by access public void Dispose() #pragma warning restore SA1202 // Elements must be ordered by access { if (isDisposing) { return; } isDisposing = true; foreach (ModuleFile alias in LinkedAliases) { alias.Dispose(); } LinkedAliases.Clear(); foreach (FileData opened in OpenedFiles) { opened.Dispose(); } OpenedFiles.Clear(); foreach (FileData related in RelatedFiles) { related.Dispose(); } RelatedFiles.Clear(); foreach (FileData referenced in ReferencedByFileData.Values) { referenced.Dispose(); } ReferencedByFileData.Clear(); }