container.AddComponent();
container.AddComponentThis registers MyService as a singleton component that implements the IMyService interface. It also specifies a constructor argument with the name "myParameter" and the value "someValue". This code uses lambda expressions to specify the configuration options. The WindsorContainer class is part of the Castle Windsor package library.( LifestyleType.Singleton, b => b.Service ().ImplementedBy () .DependsOn(Dependency.OnValue("myParameter", "someValue")) );