This commit is contained in:
Ryan Nowak 2014-09-12 13:02:24 -07:00
Родитель 447336b4f3
Коммит d57c34392f
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -23,7 +23,9 @@ namespace Microsoft.AspNet.Mvc.Internal
if (services.GetServiceOrNull(typeof(MvcMarkerService)) == null)
{
throw new InvalidOperationException(Resources.FormatUnableToFindServices(
"IServiceCollection.AddMvc()", "IApplicationBuilder.UseServices(...)", "IApplicationBuilder.UseMvc(...)"));
"IServiceCollection.AddMvc()",
"IApplicationBuilder.UseServices(...)",
"IApplicationBuilder.UseMvc(...)"));
}
}
}

Просмотреть файл

@ -23,7 +23,9 @@ namespace Microsoft.AspNet.Builder
});
}
public static IApplicationBuilder UseMvc([NotNull] this IApplicationBuilder app, [NotNull] Action<IRouteBuilder> configureRoutes)
public static IApplicationBuilder UseMvc(
[NotNull] this IApplicationBuilder app,
[NotNull] Action<IRouteBuilder> configureRoutes)
{
// Verify if AddMvc was done before calling UseMvc
// We use the MvcMarkerService to make sure if all the services were added.