19 lines
701 B
C#
19 lines
701 B
C#
// 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.AspNetCore.Mvc.ModelBinding;
|
|
|
|
namespace Microsoft.AspNetCore.Mvc
|
|
{
|
|
/// <summary>
|
|
/// Specifies that a parameter or property should be bound using the request body.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
|
public class FromBodyAttribute : Attribute, IBindingSourceMetadata
|
|
{
|
|
/// <inheritdoc />
|
|
public BindingSource BindingSource { get { return BindingSource.Body; } }
|
|
}
|
|
}
|