This project is read-only.

Trying to resolve a dependency from outside Orchard

Topics: Troubleshooting, Writing modules
Feb 4, 2014 at 10:24 AM
I am trying to add some real time functionality using xsockets.

I am calling a publish method from javascript which hits the ''Runserveractivity'' method
public class Chat : XSocketController 
        public void Runserveractivity() {


            this.Send("sent from caller", "notifyclientstatus");
Then i have another class which runs server side stuff
public    class OperationsManager
        public  static   void RunOperation() {
            //do stuff 
           //Resolve some orchard dependencies 
        var  myservice =   ?????.Resolve<IMyService>


From within OperationsManager I wish to grab some Idependency services to invoke , but can i do this inside OperationsManager without access to workcontextaccessor ?

I cannot inject the service in the xsocekstcontroller as it will break its functionality.
Any ideas ?
Maybe a way to grab autofac container directly and resolve from there?