File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Common/CustomAttributes Expand file tree Collapse file tree 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
155155 attributeList . AddRange ( f . GetCustomAttributes ( typeof ( GenericBreakingChangeWithVersionAttribute ) , false ) . Cast < GenericBreakingChangeWithVersionAttribute > ( ) ) ;
156156 }
157157
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+ }
161163 }
162164
163165 return invocationInfo == null ? attributeList : attributeList . Where ( e => e . IsApplicableToInvocation ( invocationInfo ) ) ;
You can’t perform that action at this time.
0 commit comments