Windsor Castle automatic non-public injection

I installed Castle Windsor in my ASP.NET Mvc 3 project and added the following property to HomeController :

  private IUserService UserService { get; set; } 

When I try to use UserService in an action method, it is always zero. But, if I change the property to public , it is automatically created by the Castle Windsor instance.

Is it possible to automatically nest properties with non-public properties?

+4
source share
1 answer

No, this is not possible because @Mauricio Scheffer comments

+1
source

Source: https://habr.com/ru/post/1386400/


All Articles