Unity Vs PostSharp

Sep 30, 2009 at 9:01 PM

Am I reading this right you can use either or?  Are there limitations of using Unity?  We already use that and if we can use this with unity then great.  Are there any examples?

Oct 2, 2009 at 10:57 AM

In the Validation.Aspects.Unity solution is a unit test project which will hopefully provide you with enough info. It's been a long time since I looked at Unity but at the time I couldn't get the VA object.Validate() extension method to work because there was no way for VA to be able to dig into the proxy to identify the target type to perform a reflection pass to identify the attached validators. In Castle.DynamicProxy2, which is a runtime interception library like Unity, the proxies have a DP2 interface added to them to get the target type and I expected Unity to provide something similar. Maybe it does now?

You can still use VA with Unity but the type of validation is limited.