File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/Microsoft.PowerShell.Commands.Utility/commands/utility Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1313using System . Management . Automation . Internal ;
1414using System . Management . Automation . Security ;
1515using System . Reflection ;
16+ using System . Runtime . CompilerServices ;
1617using System . Runtime . Loader ;
1718using System . Security ;
1819using System . Text ;
@@ -891,7 +892,14 @@ private IEnumerable<PortableExecutableReference> GetPortableExecutableReferences
891892
892893 private void WriteTypes ( Assembly assembly )
893894 {
894- WriteObject ( assembly . GetTypes ( ) , true ) ;
895+ foreach ( Type type in assembly . GetTypes ( ) )
896+ {
897+ // We only write out types that are not auto-generated by compiler.
898+ if ( type . GetCustomAttribute < CompilerGeneratedAttribute > ( ) is null )
899+ {
900+ WriteObject ( type ) ;
901+ }
902+ }
895903 }
896904
897905 #endregion LoadAssembly
You can’t perform that action at this time.
0 commit comments