as far as I understood from debugging the code, the problem seems to be in NamespaceCollection<T>
There you have private Dictionary<string, T> allTypes = new Dictionary<string, T>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
and in NamespaceCollection you add to InnerAllTypes, which points to this private field
but symbolFactory.ClearTypes() calls ICollection<INamespace<IDataType>>.Clear() and leaves this private field in the original state, so although the interfaces are cleared, the types are not
as far as I understood from debugging the code, the problem seems to be in
NamespaceCollection<T>
There you haveprivate Dictionary<string, T> allTypes = new Dictionary<string, T>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
and in
NamespaceCollection
you add toInnerAllTypes
, which points to this private fieldbut
symbolFactory.ClearTypes()
callsICollection<INamespace<IDataType>>.Clear()
and leaves this private field in the original state, so although the interfaces are cleared, the types are not