// 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.Extensions.Options; namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal { /// /// A implementation which will add the /// XML serializer formatters to . /// public class MvcXmlSerializerMvcOptionsSetup : IConfigureOptions { /// /// Adds the XML serializer formatters to . /// /// The . public void Configure(MvcOptions options) { options.OutputFormatters.Add(new XmlSerializerOutputFormatter()); options.InputFormatters.Add(new XmlSerializerInputFormatter(options)); } } }