When using Unity and its BuildUp() method to fulfil property-injection dependencies, the syntax
container.BuildUp(myObject)
will not in itself work - even though it compiles just fine! Instead, use
container.BuildUp(myObject.GetType(), myObject)
and the property-injection dependencies will be fulfilled.
No comments:
Post a Comment