using System; using System.Collections.Specialized; using System.Threading.Tasks; namespace EmbedIO.WebApi { /// /// Specifies that a parameter of a controller method will receive a /// of HTML form data, obtained by deserializing a request URL query. /// The received collection will be read-only. /// This class cannot be inherited. /// /// /// [AttributeUsage(AttributeTargets.Parameter)] public sealed class QueryDataAttribute : Attribute, IRequestDataAttribute { /// public Task GetRequestDataAsync(WebApiController controller, string parameterName) => Task.FromResult(controller.HttpContext.GetRequestQueryData()); } }