Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between HostFactory.Run and HostFactory.New

Tags:

I've a need to use topshelf in the project I'm in and have a simple question I hope. Everything works just fine when I'm using HostFactory.Run, but I thought that it seemed more reasonable to use HostFactory.New by just reading the name on the function and that is used here: http://docs.topshelf-project.com/en/latest/configuration/config_api.html.

However in the more simple example, http://docs.topshelf-project.com/en/latest/configuration/quickstart.html, the HostFactory.Run is used insted of HostFactory.New. So what is the difference?

like image 810
Tomas Jansson Avatar asked Mar 22 '13 10:03

Tomas Jansson


1 Answers

Run pretty much just contains:

return New(configureCallback).Run(); 

So Run is just convenience method to create and immediately run the instance instead of just creating the instance as New does.

like image 85
DavGarcia Avatar answered Oct 21 '22 06:10

DavGarcia