I have a function in my controller class - that is working with xml format file something like
public URI convertXML(Uri pathToFile)
{
// conversion goes here
}
and I dlike to run it as
[STAThread]
public URI convertXML(Uri pathToFile)
{
// conversion goes here
}
something like
public ActionResult DoTheThingsRight()
{
//...
var resultingURI = [as STAThread] convertXML(filePath);
}
I have found How to run something in the STA thread?
But I dont understand what is GetFooFromAsyncResult
in this sample, so
perhaps there is another easy way to do this?