File tree 1 file changed +12
-2
lines changed
Generator/Beyond.NET.CodeGenerator/Extensions
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,21 @@ public static class PropertyInfoExtensions
11
11
if ( setterMethod is not null ) {
12
12
var isExternalInitType = typeof ( System . Runtime . CompilerServices . IsExternalInit ) ;
13
13
var requiredCustomModifiers = setterMethod . ReturnParameter . GetRequiredCustomModifiers ( ) ;
14
- bool isInitOnly = requiredCustomModifiers . Contains ( isExternalInitType ) ;
14
+ bool containsIsExternalInitType = requiredCustomModifiers . Contains ( isExternalInitType ) ;
15
15
16
- if ( isInitOnly ) {
16
+ if ( containsIsExternalInitType ) {
17
17
return null ;
18
18
}
19
+
20
+ var isExternalInitTypeFullName = isExternalInitType . FullName ;
21
+
22
+ foreach ( var requiredCustomModifier in requiredCustomModifiers ) {
23
+ var requiredCustomModifierTypeFullName = requiredCustomModifier . FullName ;
24
+
25
+ if ( requiredCustomModifierTypeFullName == isExternalInitTypeFullName ) {
26
+ return null ;
27
+ }
28
+ }
19
29
}
20
30
21
31
return setterMethod ;
You can’t perform that action at this time.
0 commit comments