Look at the following points

  • Create a new project (I created a Console Application).
  • Add NuGet package Castle.Core, Castle.Windsor and Log4Net.
  • Castle.Core: Allow we to use Proxy
Proxy objects can assist in building a flexible application architecture because it allows functionality to be transparently added to code without modifying it. For example, a class could be proxied to add logging or security checking without making the code aware this functionality has been added.

For example, NHibernate, an object/relational mapper uses DynamicProxy to provide lazy loading of data without the domain model classes being aware of this functionality.
  • Castle.Widsor: IoC (Inversion of control container).

  • Log4net: Lib to log our application.

    Castle

    log4net

References