diff --git a/NuGet.config b/NuGet.config index 52bf414192..5500f6d507 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,4 +1,4 @@ - + diff --git a/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcBuilderExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcBuilderExtensions.cs index 8355d80fdb..a0f9e56983 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcBuilderExtensions.cs @@ -16,6 +16,20 @@ namespace Microsoft.Framework.DependencyInjection /// public static class MvcCoreMvcBuilderExtensions { + /// + /// Registers an action to configure . + /// + /// The . + /// An . + /// The . + public static IMvcBuilder AddMvcOptions( + [NotNull] this IMvcBuilder builder, + [NotNull] Action setupAction) + { + builder.Services.Configure(setupAction); + return builder; + } + public static IMvcBuilder AddFormatterMappings( [NotNull] this IMvcBuilder builder, [NotNull] Action setupAction) diff --git a/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs index a45633ef0b..698216b1e6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs @@ -16,6 +16,20 @@ namespace Microsoft.Framework.DependencyInjection { public static class MvcCoreMvcCoreBuilderExtensions { + /// + /// Registers an action to configure . + /// + /// The . + /// An . + /// The . + public static IMvcCoreBuilder AddMvcOptions( + [NotNull] this IMvcCoreBuilder builder, + [NotNull] Action setupAction) + { + builder.Services.Configure(setupAction); + return builder; + } + public static IMvcCoreBuilder AddFormatterMappings(this IMvcCoreBuilder builder) { AddFormatterMappingsServices(builder.Services);