public void AddClassToNamespaceList(IClass addClass) { lock (namespaces) { AddClassToNamespaceListInternal(addClass); } DomCache.Clear(); }
public void UpdateCompilationUnit(ICompilationUnit oldUnit, ICompilationUnit parserOutput, string fileName) { // DC: Since we need to update the compilation units with more data, the Freeze below makes the classes to be ReadOnly (which prevent adding new ones) // so for now I'm commenting out this line (and need to figure out what are its side effects) // maybe I need this after all parserOutput.Freeze(); lock (namespaces) { if (oldUnit != null) { foreach (IClass c in oldUnit.Classes) { RemoveClass(c); } foreach (IAttribute attr in oldUnit.Attributes) { assemblyAttributes.Remove(attr); } } foreach (IClass c in parserOutput.Classes) { AddClassToNamespaceListInternal(c); } assemblyAttributes.AddRange(parserOutput.Attributes); } DomCache.Clear(); }
protected virtual void OnReferencedContentsChanged(EventArgs e) { systemTypes = null; // re-create system types DomCache.Clear(); if (ReferencedContentsChanged != null) { ReferencedContentsChanged(this, e); } }
public void RemoveCompilationUnit(ICompilationUnit unit) { lock (namespaces) { foreach (IClass c in unit.Classes) { RemoveClass(c); } foreach (IAttribute attr in unit.Attributes) { assemblyAttributes.Remove(attr); } } DomCache.Clear(); }
public void UpdateCompilationUnit(ICompilationUnit oldUnit, ICompilationUnit parserOutput, string fileName) { parserOutput.Freeze(); lock (namespaces) { if (oldUnit != null) { foreach (IClass c in oldUnit.Classes) { RemoveClass(c); } foreach (IAttribute attr in oldUnit.Attributes) { assemblyAttributes.Remove(attr); } } foreach (IClass c in parserOutput.Classes) { AddClassToNamespaceListInternal(c); } assemblyAttributes.AddRange(parserOutput.Attributes); } DomCache.Clear(); }