Hosting: Throw if startup method isn't void-returning.

This commit is contained in:
GrabYourPitchforks 2014-04-24 12:54:50 -07:00
parent aa4dfffd84
commit 4077c03a7b
1 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,11 @@ namespace Microsoft.AspNet.Hosting.Startup
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)
{