AddHttpContextOrThreadScoped does not register multiple services correctly

Fixed in

EPiServer.CMS.Core 11.1.0

Created

Oct 02, 2017

Updated

Nov 21, 2017

Area

CMS Core

State

Closed, Fixed and tested


Description

When using AddHttpContextOrThreadScoped<TService, TImpl>() to register multiple implementations, the last implementation is registered for all. So, calling ServiceLocator.Current.GetAllInstances<TService>() does not return all types – it returns a list of the last registered type.