Releases: kontent-ai/delivery-sdk-net
14.0.1
https://www.nuget.org/packages/Kentico.Kontent.Delivery/14.0.1
- Contains a minor fix related to Single File Deployment on .NET 5 (
Assembly.Location
can be null)
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
13.0.2
Fixes:
- #223 - predictable memory usage (related to
IOptionsMonitor
)
https://www.nuget.org/packages/Kentico.Kontent.Delivery/13.0.2
13.0.1
https://www.nuget.org/packages/Kentico.Kontent.Delivery/13.0.1
New features:
- support for
HttpClientFactory
- support for memory caching
- support for registering multiple clients
- support for hot-reloading of configuration via
IOptionsSnapshot
andIOptionsMonitor
- new best practices for working with the SDK
- better support for structured rich-text rendering of assets
Breaking changes:
WithHttpClient(new HttpClient())
becameWithDeliveryHttpClient(new DeliveryHttpClient(new HttpClient()))
(see the docs)- interfaces and models have been moved to the abstraction library
Kentico.Kontent.Delivery.Abstractions
-> add this namespace to your codefiles (or use the Code Generator v5, link below)
Related releases:
12.3.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery/12.3.0
GetItemsAsync
response can include the total item count matching the search criteria. UseIncludeTotalCountParameter
to use this feature. This can be used to build paging navigation.
12.2.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery/12.2.0
- Fixed some issue when used from Client-side Blazor
- Added Width and Height properties to Asset model
12.1.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery/12.1.0
- Items feed exposes the current continuation token. Use the
ContinuationToken
property of theDeliveryItemsFeedResponse
. - Items feed is easier to mock and test. Use the
IDeliveryItemsFeed
interface to create your own.
12.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery/12.0.0
New features
- Response models provide information whether content is stale. Use the
HasStaleContent
property to determine content status. - Items can be enumerated in a streaming fashion. Use the
GetItemsFeed
method to create a feed. Use theHasMoreResults
property and theFetchNextBatchAsync
method to enumerate the feed.
Breaking changes
GetTaxonomyAsync
,GetTypeAsync
andGetContentElementAsync
methods return response models instead of taxonomy group, content type or content type element models. UseTaxonomy
,Type
orElement
properties to get response content. There is also an implicit conversion from response models to their content.- Improved retry policy. Apart from error responses it also handles connection issues and it no longer depends on
Polly
. Use theWithDefaultRetryPolicyOptions
method to customize settings of the default retry policy. Create a custom retry policy by implementingIRetryPolicy
andIRetryPolicyProvider
interfaces. - Updated client options.
- Use the
UseProductionApi
method instead of theUseProductionApi
property. - Use the
WaitForLoadingNewContent
method instead of theWaitForLoadingNewContent
property. - Use the
UseProductionApi
method with a secure access key parameter instead of theUseSecuredProductionApi
method when secure access to the Delivery API is enabled. - Use
UseSecureAccess
andSecureAccessApiKey
properties instead ofUseSecuredProductionApi
andSecuredProductionApiKey
properties to configure client when secure access is enabled.
- Use the