Popcorn is a .Net Middleware for your RESTful API that allows your consumers to request exactly as much or as little as they need, with no effort from you.
Allows for ExpandResultAttribute to accept an optional boolean parameter for specifying behavior, to expand result or to not expand result, which is then set as the value of the ExpandResultAttribute.ShouldExpand property.
DoNotExpandResultAttribute now inherits from ExpandResultAttribute but always passing in false.
The ExpandActionFilter has been updated to accommodate if ExpandResultAttribute.ShouldExpand is set to false.
Tested with example projects. The attributes still have the same types (and default behavior) and won't break any code looking at the attribute types, if developers have custom logic written towards the types.
Description
Allows for
ExpandResultAttribute
to accept an optional boolean parameter for specifying behavior, to expand result or to not expand result, which is then set as the value of theExpandResultAttribute.ShouldExpand
property.DoNotExpandResultAttribute
now inherits fromExpandResultAttribute
but always passing infalse
. TheExpandActionFilter
has been updated to accommodate ifExpandResultAttribute.ShouldExpand
is set tofalse
.Related Issue
Relevant issue
Motivation and Context
Relevant issue
How Has This Been Tested?
Tested with example projects. The attributes still have the same types (and default behavior) and won't break any code looking at the attribute types, if developers have custom logic written towards the types.
Screenshots (if appropriate):