Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts: # src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs # src/Umbraco.Core/Models/PublishedContent/PublishedContentBase.cs # src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs # src/Umbraco.Core/Packaging/ConflictingPackageData.cs # src/Umbraco.Core/Packaging/PackagesRepository.cs # src/Umbraco.Core/PublishedCache/PublishedMember.cs # src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs # src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs # src/Umbraco.PublishedCache.NuCache/PublishedContent.cs # src/Umbraco.Tests/Persistence/Repositories/MacroRepositoryTest.cs # src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs # src/Umbraco.Web/Macros/PublishedContentHashtableConverter.cs # src/Umbraco.Web/PublishedContentExtensions.cs # src/Umbraco.Web/Trees/MediaTypeTreeController.cs
This commit is contained in:
@@ -79,9 +79,12 @@ namespace Umbraco.Core.Composing
|
||||
foreach (var type in types)
|
||||
EnsureType(type, "register");
|
||||
|
||||
// register them
|
||||
// register them - ensuring that each item is registered with the same lifetime as the collection.
|
||||
// NOTE: Previously each one was not registered with the same lifetime which would mean that if there
|
||||
// was a dependency on an individual item, it would resolve a brand new transient instance which isn't what
|
||||
// we would expect to happen. The same item should be resolved from the container as the collection.
|
||||
foreach (var type in types)
|
||||
register.Register(type);
|
||||
register.Register(type, CollectionLifetime);
|
||||
|
||||
_registeredTypes = types;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user