Fixes #4067: formatters added note about order;change code (#4144)

* formatters added note about order;change code

* added space between sentences
pull/4169/head
Rachel Appel 2017-08-31 21:45:30 +02:00 committed by Scott Addie
parent fcd26bdbb2
commit 377d8cdcdd
2 changed files with 4 additions and 2 deletions

View File

@ -91,6 +91,8 @@ To use a custom formatter, add an instance of the formatter class to the `InputF
[!code-csharp[Main](custom-formatters/sample/Startup.cs?name=mvcoptions&highlight=3-4)]
Formatters are evaluated in the order you insert them. The first one takes precedence.
## Next steps
See the [sample application](https://github.com/aspnet/Docs/tree/master/aspnetcore/mvc/advanced/custom-formatters/Sample), which implements simple vCard input and output formatters. The application reads and writes vCards that look like the following example:

View File

@ -29,8 +29,8 @@ namespace CustomFormatterDemo
#region mvcoptions
services.AddMvc(options =>
{
options.InputFormatters.Add(new VcardInputFormatter());
options.OutputFormatters.Add(new VcardOutputFormatter());
options.InputFormatters.Insert(0, new VcardInputFormatter());
options.OutputFormatters.Insert(0, new VcardInputFormatter());
});
#endregion