Home

Castle Stronghold

FAQ

This page has a list of frequently asked questions.

General questions

Is constructor or property "injection" supported?

Yes, it has always been supported.

Is an "injection" approach recommended more strongly?

No, but from the MicroKernel point of view there's a semantic on constructors and another one for properties. Constructor parameters are treated as non-optional dependencies while properties are considered optional.

My interface/class has generic arguments or generic methods. Is it supported?

Yes, but you cannot associate an interceptor with these classes. Dynamic Proxy 1.1.5 does not support generic interfaces or classes. This is going to be fixed on the next release. Promise.

I registered a class that implements a service but I cannot set its properties

This happens if you have an interceptor associated with the class as the proxy generated by DynamicProxy 1.1.5 does not allow the container to access the target. This is going to be fixed on the next release. Promise.

Google
Search WWW Search castleproject.org