I think Louis set up a way to do this via dependency injection, but I'm a bit fuzzy on the details. Louis?
Date: Wed, 20 Mar 2013 20:20:12 -0700
From:
ate...@gmail.comTo:
net-http-a...@googlegroups.comSubject: Pass a parameter to Startup class
(sorry for my bad english) I am developing an app thats creates a http layer to comunicate with an external application. I already have a class library that communicate with the external application. Now I created a console application (for test purpouses) on wich I host a
ASP.NET Web API and SignalR. This works fine, when I run the console app, I can access my controllers and signalR works perfeclty. Now I need to be able from a web api controller to access my external application but I also need to be able to control this application from the main app.
So, basically, what I need, on my app is this:
//MyClass controls the external application
MyClass myClass = new MyClass();
//how can I pass myClass instance to Startup?
WebApplication.Start<Startup>(url);
PS.: I cannot create another myClass instance inside my Controller, it needs to be the same instance used by the application hosting it.
--
You received this message because you are subscribed to the Google Groups ".NET HTTP Abstractions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
net-http-abstrac...@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.