// 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 System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Routing; namespace Microsoft.AspNetCore.Mvc { /// /// Identifies an action that supports the HTTP PUT method. /// public class HttpPutAttribute : HttpMethodAttribute { private static readonly IEnumerable _supportedMethods = new [] { "PUT" }; /// /// Creates a new . /// public HttpPutAttribute() : base(_supportedMethods) { } /// /// Creates a new with the given route template. /// /// The route template. May not be null. public HttpPutAttribute(string template) : base(_supportedMethods, template) { if (template == null) { throw new ArgumentNullException(nameof(template)); } } } }