// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Mvc { /// /// A that retrieves controllers as services from the request's /// . /// public class ServiceBasedControllerActivator : IControllerActivator { /// public object Create([NotNull] ActionContext actionContext, [NotNull] Type controllerType) { return actionContext.HttpContext.RequestServices.GetRequiredService(controllerType); } } }