From f206cf6759dd09920c8a30cd98e2800e70e878cf Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Mon, 22 Jun 2015 10:47:25 -0700 Subject: [PATCH] Removed IJsonOutputFormatter --- .../Formatters/IJsonOutputFormatter.cs | 20 ------------------- .../Formatters/JsonOutputFormatter.cs | 13 +++++++++++- .../JsonResult.cs | 2 +- 3 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 src/Microsoft.AspNet.Mvc.Extensions/Formatters/IJsonOutputFormatter.cs diff --git a/src/Microsoft.AspNet.Mvc.Extensions/Formatters/IJsonOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Extensions/Formatters/IJsonOutputFormatter.cs deleted file mode 100644 index 8f165fad0d..0000000000 --- a/src/Microsoft.AspNet.Mvc.Extensions/Formatters/IJsonOutputFormatter.cs +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -namespace Microsoft.AspNet.Mvc -{ - /// - /// An output formatter that specializes in writing JSON content. - /// - /// - /// The class filter the collection of - /// and use only those which implement - /// . - /// - /// To create a custom formatter that can be used by , derive from - /// or implement . - /// - public interface IJsonOutputFormatter : IOutputFormatter - { - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Extensions/Formatters/JsonOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Extensions/Formatters/JsonOutputFormatter.cs index 3819da2799..27ce61ab5c 100644 --- a/src/Microsoft.AspNet.Mvc.Extensions/Formatters/JsonOutputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Extensions/Formatters/JsonOutputFormatter.cs @@ -11,7 +11,18 @@ using Newtonsoft.Json; namespace Microsoft.AspNet.Mvc { - public class JsonOutputFormatter : OutputFormatter, IJsonOutputFormatter + /// + /// An output formatter that specializes in writing JSON content. + /// + /// + /// The class filter the collection of + /// and use only those of type + /// . + /// + /// To create a custom formatter that can be used by , derive from + /// . + /// + public class JsonOutputFormatter : OutputFormatter { private JsonSerializerSettings _serializerSettings; diff --git a/src/Microsoft.AspNet.Mvc.Extensions/JsonResult.cs b/src/Microsoft.AspNet.Mvc.Extensions/JsonResult.cs index c600ddb23e..dc036ce5be 100644 --- a/src/Microsoft.AspNet.Mvc.Extensions/JsonResult.cs +++ b/src/Microsoft.AspNet.Mvc.Extensions/JsonResult.cs @@ -130,7 +130,7 @@ namespace Microsoft.AspNet.Mvc .GetRequiredService>() .Options .OutputFormatters - .OfType() + .OfType() .ToArray(); var formatter = objectResult.SelectFormatter(formatterContext, formatters);