I've a custom service that I've written into a Ucommerce pipeline task, but that is implementing the Umbraco ContentService. This has meant that I've also needed to inject that service into container config too.
<component id="ContentService"
service="Umbraco.Core.Services.IContentService, Umbraco.Core"
type="Umbraco.Core.Services.Implement.ContentService, Umbraco.Core" />
But by injecting the Umbraco ContentService, that has led to to loads of additional services to run
I'm trying to register the first one. the UmbracoDatabaseFactory here, but it's not working
<component id="UmbracoDatabaseFactory"
service="Umbraco.Core.Persistence.IUmbracoDatabaseFactory', Umbraco.Core"
type="Umbraco.Core.Persistence.UmbracoDatabaseFactory, Umbraco.Core" />
The service is correct, but the type doesn't appear to match. Is it because the type isn't public? https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs
Is this the correct approach or is there another way of doing it?
- Service 'ContentService' which was registered but is also waiting for dependencies.
'ContentService' is waiting for the following dependencies:
- Service 'IScopeProvider' which was registered but is also waiting for dependencies.
'IScopeProvider' is waiting for the following dependencies:
- Service 'Umbraco.Core.Persistence.IUmbracoDatabaseFactory' which was not registered.
- Service 'Umbraco.Core.IO.FileSystems' which was not registered.
- Service 'Umbraco.Core.Logging.ILogger' which was not registered.
- Service 'Umbraco.Core.Logging.ILogger' which was not registered.
- Service 'Umbraco.Core.Events.IEventMessagesFactory' which was not registered.
- Service 'Umbraco.Core.Persistence.Repositories.IDocumentRepository' which was not registered.
- Service 'Umbraco.Core.Persistence.Repositories.IEntityRepository' which was not registered.
- Service 'Umbraco.Core.Persistence.Repositories.IAuditRepository' which was not registered.
- Service 'Umbraco.Core.Persistence.Repositories.IContentTypeRepository' which was not registered.
- Service 'Umbraco.Core.Persistence.Repositories.IDocumentBlueprintRepository' which was not registered.
- Service 'Umbraco.Core.Persistence.Repositories.ILanguageRepository' which was not registered.