File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/BizHawk.Tests/Client.Common/config Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System . Collections . Generic ;
2
2
using System . Drawing ;
3
+ using System . Linq ;
3
4
using System . Reflection ;
4
5
5
6
using BizHawk . Client . Common ;
@@ -76,8 +77,13 @@ static void CheckAll<T>(string? groupDesc = null)
76
77
foreach ( var mi in t . GetMembers ( BindingFlags . Instance | BindingFlags . Public | BindingFlags . NonPublic ) )
77
78
{
78
79
if ( mi . GetCustomAttribute < JsonIgnoreAttribute > ( ) is not null ) continue ;
80
+ if ( mi . MemberType == MemberTypes . Event ) continue ;
79
81
if ( mi is PropertyInfo pi ) CheckMemberAndTypeParams ( pi . PropertyType , groupDesc ) ;
80
- else if ( mi is FieldInfo fi ) CheckMemberAndTypeParams ( fi . FieldType , groupDesc ) ;
82
+ else if ( mi is FieldInfo fi )
83
+ {
84
+ if ( t . GetMember ( mi . Name ) . Any ( m => m . MemberType == MemberTypes . Event ) ) continue ; // events are weird
85
+ CheckMemberAndTypeParams ( fi . FieldType , groupDesc ) ;
86
+ }
81
87
}
82
88
}
83
89
CheckAll < Config > ( ) ;
You can’t perform that action at this time.
0 commit comments