14.0.0
New features
- Support for distributed caching via the
IDistributedCache
interface - #196- there is a new implementation of
IDeliveryCacheManager
calledDistributedCacheManager
which implements theIDistributedCache
interface using BSON serialization - it's possible to register the cache using
Kentico.Kontent.Delivery.Caching.Extensions.ServiceCollectionExtensions.AddDeliveryClientCache()
by changingDeliveryCacheOptions.CacheType
fromMemory
toDistributed
. by default, it registers theMemoryDistributedCache
. if you want to use a different implementation (e.g. redis, you need to register its instance before callingAddDeliveryClientCache()
- Documentation
- there is a new implementation of
IContentLinkUrlResolver
is nowasync
(as well as several other interfaces - see the breaking changes below) - #213DebuggerDisplay
attributes for models - #211- Enabled low level access to the
ApiResponse
- #217 - Faking responses made simpler by only returning interfaces - #216 & #61
- Added support for new types of filters #229 #232
Bugfixes
- Automatic formatting of the image transformation API - #224
- Memory leak when registering named clients - #223
- Hashcode of a cached type is now part of the cache key - #236
Breaking changes & upgrade advice
- all models have their interfaces extracted to
Kentico.Kontent.Delivery.Abstractions
and the SDK returns only the respective interfaces- for
Asset
we haveIAsset
, forContentType
there is anIContentType
, etc.
- for
DeliveryCacheManager
was renamed toMemoryCacheManager
IPropertyValueConverter.GetPropertyValue
was madeasync
and strongly-typed. Instead ofJToken
, you receiveContentElementValue<T>
withName
,Codename
,Type
, andValue
properties whereValue
is of typeT
andT
is the type of your property (DateTime
,string
,int
,Asset
....).- methods in
IContentLinkUrlResolver
,IModelProvider
,IInlineContentItemsProcessor
are nowasync
. their input parameters remain the same but their return type changed toTask<T>
instead of the originalT
and they all haveAsync
suffix - some models are now more specific (contain e.g.
Guid
instead ofstring
where it was appropriate) - applyGuid.Parse()
orGuid.ToString()
to keep your code compatible or adoptGuid
s in your code as well - places which returned
ContentElement
now returnIContentElement
. plus, based on the type of the element, they can return a type castable toIMultipleChoiceElement
orITaxonomyElement
to allow strongly typed access to members specific to these types - the
IDeliveryClient
now contains onlyasync
methods that operate upon strongly-typed models. all JSON-based methods were removed. if someone wishes to access the raw JSON, allDelivery*Response
objects contain an object calledApiResponse
of theIApiResponse
type. this property contains low-level data likestring Content
,string RequestUrl
, orstring ContinuationToken
.- some overloads were preserved as extension methods but are not required when implementing the
IDeliveryClient
interface
- some overloads were preserved as extension methods but are not required when implementing the
IInlineImage
's properties were renamed fromAltText
andSrc
toDescription
andUrl
respectively- All code from the
Kentico.Kontent.Delivery.ImageTransformation
namespace was extracted to a separate NuGet packageKentico.Kontent.ImageTransformation
- removed the -
AddDeliveryClient(this IServiceCollection services, string name, Func<IDeliveryClientBuilder, IDeliveryClient> buildDeliveryClient)
extension method - please use any other overload (they should provide enough flexibility for all scenarios) - AngleSharp reference was upgraded to the latest stable version - 0.14.0. If you explicitly reference an older version in your projects, please follow the migration guide and upgrade to 0.14.0 too.
Model generator
Use model generator v6.0.0
NuGets
https://www.nuget.org/packages/Kentico.Kontent.Delivery/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery.Rx/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery.Caching/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery.Abstractions/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.ImageTransformation/14.0.0