private static void TypeDependsClosure(NamedTypeSymbol type, CSharpCompilation currentCompilation, HashSet <Symbol> partialClosure) { if ((object)type == null) { return; } type = type.OriginalDefinition; if (partialClosure.Add(type)) { if (type.IsInterface) { foreach (var bt in type.GetDeclaredInterfaces(null)) { TypeDependsClosure(bt, currentCompilation, partialClosure); } } else { TypeDependsClosure(type.GetDeclaredBaseType(null), currentCompilation, partialClosure); } // containment is interesting only for the current compilation if (currentCompilation != null && type.IsFromCompilation(currentCompilation)) { TypeDependsClosure(type.ContainingType, currentCompilation, partialClosure); } } }
internal sealed override ImmutableArray <NamedTypeSymbol> GetDeclaredInterfaces( ConsList <TypeSymbol> basesBeingResolved ) { return(_unbound ? ImmutableArray <NamedTypeSymbol> .Empty : Map.SubstituteNamedTypes( OriginalDefinition.GetDeclaredInterfaces(basesBeingResolved) )); }
private static void InterfaceDependsClosure(NamedTypeSymbol type, HashSet <Symbol> partialClosure) { type = type.OriginalDefinition; if (partialClosure.Add(type)) { foreach (var bt in type.GetDeclaredInterfaces(null)) { InterfaceDependsClosure(bt, partialClosure); // containment is not interesting for interfaces as they cannot nest in C# } } }
private static void InterfaceDependsClosure(NamedTypeSymbol type, HashSet<Symbol> partialClosure) { type = type.OriginalDefinition; if (partialClosure.Add(type)) { foreach (var bt in type.GetDeclaredInterfaces(null)) { InterfaceDependsClosure(bt, partialClosure); // containment is not interesting for interfaces as they cannot nest in C# } } }