// 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.AspNet.Mvc;
namespace Microsoft.Framework.DependencyInjection
{
///
/// Extensions methods for configuring MVC via an .
///
public static class MvcViewFeaturesMvcBuilderExtensions
{
///
/// Adds configuration of for the application.
///
/// The .
/// The which need to be configured.
public static IMvcBuilder AddViewOptions(
this IMvcBuilder builder,
Action setupAction)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
if (setupAction == null)
{
throw new ArgumentNullException(nameof(setupAction));
}
builder.Services.Configure(setupAction);
return builder;
}
}
}