// 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 Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Infrastructure;
namespace Microsoft.AspNetCore.Mvc
{
///
/// An that when executed performs content negotiation, formats the entity body, and
/// will produce a response if negotiation and formatting succeed.
///
[DefaultStatusCode(DefaultStatusCode)]
public class OkObjectResult : ObjectResult
{
private const int DefaultStatusCode = StatusCodes.Status200OK;
///
/// Initializes a new instance of the class.
///
/// The content to format into the entity body.
public OkObjectResult(object value)
: base(value)
{
StatusCode = DefaultStatusCode;
}
}
}