File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -652,8 +652,23 @@ public static bool IsPublicOrProtected(this ISymbol symbol) =>
652652 /// <summary>
653653 /// Returns true if the given symbol should be extracted in this context.
654654 /// </summary>
655- public static bool ShouldExtractSymbol ( this ISymbol symbol ) =>
656- symbol . Locations . Any ( x => ! x . IsInMetadata ) || symbol . IsPublicOrProtected ( ) ;
655+ public static bool ShouldExtractSymbol ( this ISymbol symbol )
656+ {
657+ // Extract all source symbols and public/protected metadata symbols.
658+ if ( symbol . Locations . Any ( x => ! x . IsInMetadata ) || symbol . IsPublicOrProtected ( ) )
659+ {
660+ return true ;
661+ }
662+ if ( symbol is IMethodSymbol method )
663+ {
664+ return method . ExplicitInterfaceImplementations . Any ( m => m . ContainingType . DeclaredAccessibility == Accessibility . Public ) ;
665+ }
666+ if ( symbol is IPropertySymbol property )
667+ {
668+ return property . ExplicitInterfaceImplementations . Any ( m => m . ContainingType . DeclaredAccessibility == Accessibility . Public ) ;
669+ }
670+ return false ;
671+ }
657672
658673 /// <summary>
659674 /// Returns the symbols that should be extracted in the given context.
You can’t perform that action at this time.
0 commit comments