@@ -391,6 +391,33 @@ bool IsExplicitImplementation(out ISymbol result)
391
391
return false ;
392
392
}
393
393
394
+ bool HasVisibleMembers ( ITypeSymbol type , BindingFlags effectiveFlags )
395
+ {
396
+ if ( ! effectiveFlags . HasFlagFast ( BindingFlags . NonPublic ) )
397
+ {
398
+ return true ;
399
+ }
400
+
401
+ if ( effectiveFlags . HasFlagFast ( BindingFlags . DeclaredOnly ) )
402
+ {
403
+ return type . Locations . Any ( x => x . IsInSource ) ;
404
+ }
405
+
406
+ var current = type ;
407
+ while ( current != null &&
408
+ current != KnownSymbol . Object )
409
+ {
410
+ if ( ! current . Locations . Any ( x => x . IsInSource ) )
411
+ {
412
+ return false ;
413
+ }
414
+
415
+ current = current . BaseType ;
416
+ }
417
+
418
+ return true ;
419
+ }
420
+
394
421
string TrimName ( )
395
422
{
396
423
var index = targetMetadataName . IndexOf ( '`' ) ;
@@ -637,33 +664,6 @@ private static bool MatchesFilter(ISymbol candidate, string metadataName, Bindin
637
664
return true ;
638
665
}
639
666
640
- private static bool HasVisibleMembers ( ITypeSymbol type , BindingFlags effectiveFlags )
641
- {
642
- if ( ! effectiveFlags . HasFlagFast ( BindingFlags . NonPublic ) )
643
- {
644
- return true ;
645
- }
646
-
647
- if ( effectiveFlags . HasFlagFast ( BindingFlags . DeclaredOnly ) )
648
- {
649
- return type . Locations . Any ( x => x . IsInSource ) ;
650
- }
651
-
652
- var current = type ;
653
- while ( current != null &&
654
- current != KnownSymbol . Object )
655
- {
656
- if ( ! current . Locations . Any ( x => x . IsInSource ) )
657
- {
658
- return false ;
659
- }
660
-
661
- current = current . BaseType ;
662
- }
663
-
664
- return true ;
665
- }
666
-
667
667
private static bool TryGetType ( ExpressionSyntax expression , SyntaxNodeAnalysisContext context , PooledSet < ExpressionSyntax > visited , out ITypeSymbol result , out Optional < IdentifierNameSyntax > instance )
668
668
{
669
669
instance = default ( Optional < IdentifierNameSyntax > ) ;
0 commit comments