Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Hosting: Throw if startup method isn't void-returning.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabYourPitchforks committed Apr 24, 2014
1 parent aa4dfff commit 4077c03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Microsoft.AspNet.Hosting/Startup/StartupLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public Action<IBuilder> LoadStartup(string applicationName, IList<string> diagno
throw new Exception("TODO: Configuration method not found");
}

if (methodInfo.ReturnType != typeof(void))
{
throw new Exception("TODO: Configuration method isn't void-returning.");
}

object instance = null;
if (!methodInfo.IsStatic)
{
Expand Down

0 comments on commit 4077c03

Please sign in to comment.