Expose "expanding" state in API value conversion (#14312)

* Expose "expanding" state in API value conversion

* Add unit test

* Add non-breaking and obsoletion

* Add compat suppressions
This commit is contained in:
Kenn Jacobsen
2023-05-31 08:46:30 +02:00
committed by GitHub
parent 84a0cd8c09
commit 3b433e6658
36 changed files with 121 additions and 63 deletions

View File

@@ -228,7 +228,7 @@ internal class PublishedElementPropertyBase : PublishedPropertyBase
{
CacheValues cacheValues = GetCacheValues(cacheLevel);
object? GetDeliveryApiObject() => PropertyType.ConvertInterToDeliveryApiObject(Element, referenceCacheLevel, GetInterValue(), IsPreviewing);
object? GetDeliveryApiObject() => PropertyType.ConvertInterToDeliveryApiObject(Element, referenceCacheLevel, GetInterValue(), IsPreviewing, expanding);
return expanding
? GetDeliveryApiExpandedObject(cacheValues, GetDeliveryApiObject)
: GetDeliveryApiDefaultObject(cacheValues, GetDeliveryApiObject);