File tree 1 file changed +5
-3
lines changed
src/Common/CustomAttributes
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -155,9 +155,11 @@ public static IEnumerable<GenericBreakingChangeWithVersionAttribute> GetAllBreak
155
155
attributeList . AddRange ( f . GetCustomAttributes ( typeof ( GenericBreakingChangeWithVersionAttribute ) , false ) . Cast < GenericBreakingChangeWithVersionAttribute > ( ) ) ;
156
156
}
157
157
158
- foreach ( ParameterMetadata param in invocationInfo ? . MyCommand ? . Parameters ? . Values )
159
- {
160
- attributeList . AddRange ( param . Attributes . Where ( a => a is GenericBreakingChangeWithVersionAttribute ) . Select ( a => a as GenericBreakingChangeWithVersionAttribute ) ) ;
158
+ if ( invocationInfo ? . MyCommand ? . Parameters ? . Values != null ) {
159
+ foreach ( ParameterMetadata param in invocationInfo . MyCommand . Parameters . Values )
160
+ {
161
+ attributeList . AddRange ( param . Attributes . Where ( a => a is GenericBreakingChangeWithVersionAttribute ) . Select ( a => a as GenericBreakingChangeWithVersionAttribute ) ) ;
162
+ }
161
163
}
162
164
163
165
return invocationInfo == null ? attributeList : attributeList . Where ( e => e . IsApplicableToInvocation ( invocationInfo ) ) ;
You can’t perform that action at this time.
0 commit comments