2
Quelle est la bonne façon de passer un autre composant dans Eq()?Comment enregistrer un composant dans Castle qui prend un autre composant en paramètre dans le code?
_container.Register(
Component.For<IDocumentManagementServiceProvider>()
.ImplementedBy<DocumentumServiceProvider>()
.Parameters(Parameter.ForKey("credentials").Eq(?) // <---right here
Solution:
_container.Register(
Component.For<IDocumentManagementServiceProvider>()
.ImplementedBy<DocumentumServiceProvider>()
.ServiceOverrides(
ServiceOverride.ForKey("credentials").Eq("documentum.repository.credentials"))
.DependsOn(Property.ForKey("numberOfTimesToRetryOperation").Eq(2))
.DependsOn(Property.ForKey("millisecondsBetweenRetries").Eq(1000))
.Named("document.management.service.provider"));