Inject a object in NancyFX module

101 Views Asked by At

I am trying to use Nancy as self-hosted in a legacy application, so I am trying to change as little as possible.

My Nancy's modules need to interact with a instance of a object previously constructed that, from the point of view of Nancy is like a singleton. I am guarantee that the same instance will exists during all the lifetime of the Nancy server.

My questions is, how can I use this instance inside my modules? Thanks in advance for any help or reference.

1

There are 1 best solutions below

1
Pablo Vivera On

Is this object instance created through a dependency container in the legacy app?