79678384

Date: 2025-06-25 01:37:37
Score: 1
Natty:
Report link

Reading here: https://github.com/castleproject/Windsor/blob/master/docs/registering-components-one-by-one.md#register-existing-instance

You could do something like this:

container.Register(Component.For<IView>().Instance(this));

Note, the docs say:

⚠️ Registering instance ignores lifestyle: When you register an existing instance, even if you specify a lifestyle it will be ignored. Also registering instance, will set the implementation type for you, so if you try to do it manually, an exception will be thrown.

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: display-name unset