I have what is probably a simple question here about Castle Windsor, which I haven\'t been using for very long. I\'m trying to register a service with a specific instance that w
You can do that through the Kernel
property of the container:
container.Kernel.AddComponentInstance<IMyInterface>(serviceObj);
Try using the AddComponentInstance method on the container's Kernel object. I think this is what you need.
Please note: This technique is now deprecated. Use container.Register(Component.For<T>().Instance(myT));
instead (thanks to eouw0o83hf)