dotnet / WatsonWebserver

Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
MIT License
411 stars 85 forks source link

Adding public property about the server's status #7

Closed mor-vino closed 7 years ago

mor-vino commented 7 years ago

Hello, I'm using the WatsonWebServer in my project. I am holding an instance of the "Server" object and i have noticed i have no indication about the Http listener status, for example, i don't know if the listener encountered an exception and closed (except to the Console printings). As a solution, i added the public property as follow:

image

Another solution, is replacing the Boolean property with an Enum representing the status (Initializing\Listening\closedDueToException, etc...)

jchristn commented 7 years ago

Hi @mor-vino this is an excellent suggestion, I'll add this today and get NuGet updated with it! Thanks so much!

jchristn commented 7 years ago

Committed, pushed, and updated NuGet. Thanks so much for the contribution @mor-vino https://github.com/jchristn/WatsonWebserver/commit/dd58f27fba630164b40395d80e56953d9586aa12

mor-vino commented 7 years ago

Thanks a lot!

On Aug 15, 2017 19:36, "Joel Christner" notifications@github.com wrote:

Committed, pushed, and updated NuGet. Thanks so much for the contribution @mor-vino https://github.com/mor-vino dd58f27 https://github.com/jchristn/WatsonWebserver/commit/dd58f27fba630164b40395d80e56953d9586aa12

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jchristn/WatsonWebserver/issues/7#issuecomment-322519355, or mute the thread https://github.com/notifications/unsubscribe-auth/AMSGSj4Vm_Nnlb7_QKDN7HtNFq_BwohDks5sYckEgaJpZM4O3Pti .