How to Register a Service Dependencies?
Hi,
I want to register a Singleton service inside a Jiwa. I registered a service inside the Configure method which resides in the IJiwaRestAPIPlugin interface and it will only run when I start the Jiwa API service this is because the REST API Service is running in a different process (I believe). I want to register a singleton service so that I can access that object from the REST, scheduler service, and Jiwa application.
I want to register a Singleton service inside a Jiwa. I registered a service inside the Configure method which resides in the IJiwaRestAPIPlugin interface and it will only run when I start the Jiwa API service this is because the REST API Service is running in a different process (I believe). I want to register a singleton service so that I can access that object from the REST, scheduler service, and Jiwa application.
- Code: Select all
public class ServiceRegistry : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaRESTAPIPlugin{
public void Configure(Plugin Plugin, ServiceStackHost AppHost, Container Container, Manager JiwaApplicationManager)
{
Container.AddSingleton<IMyService, MyService>();
}
}