5 instantiations of BodyModelBinder
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Binders\BodyModelBinderProvider.cs (1)
85
return new
BodyModelBinder
(_formatters, _readerFactory, _loggerFactory, _options)
Microsoft.AspNetCore.Mvc.Core.Test (4)
ModelBinding\Binders\BodyModelBinderTests.cs (4)
605
var binder = new
BodyModelBinder
(inputFormatters, new TestHttpRequestStreamReaderFactory(), loggerFactory);
635
var binder = new
BodyModelBinder
(inputFormatters, new TestHttpRequestStreamReaderFactory(), loggerFactory);
668
var binder = new
BodyModelBinder
(new List<IInputFormatter>(), new TestHttpRequestStreamReaderFactory());
720
return new
BodyModelBinder
(formatters, new TestHttpRequestStreamReaderFactory(), loggerFactory, mvcOptions);
32 references to BodyModelBinder
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
DefaultApiDescriptionProviderTest.cs (2)
2462
private void AcceptsProduct_Custom([ModelBinder<
BodyModelBinder
>] Product product)
2562
private void FromCustom([ModelBinder<
BodyModelBinder
>] int id)
Microsoft.AspNetCore.Mvc.Core (5)
ModelBinding\Binders\BodyModelBinder.cs (5)
28
/// Creates a new <see cref="
BodyModelBinder
"/>.
41
/// Creates a new <see cref="
BodyModelBinder
"/>.
58
/// Creates a new <see cref="
BodyModelBinder
"/>.
79
_logger = loggerFactory?.CreateLogger(typeof(
BodyModelBinder
)) ?? NullLogger<
BodyModelBinder
>.Instance;
Microsoft.AspNetCore.Mvc.Core.Test (25)
ModelBinding\Binders\BodyModelBinderProviderTest.cs (1)
68
Assert.IsType<
BodyModelBinder
>(result);
ModelBinding\Binders\BodyModelBinderTests.cs (24)
40
var
binder = CreateBinder(new[] { inputFormatter });
60
var
binder = CreateBinder(new List<IInputFormatter>());
85
var
binder = CreateBinder(new List<IInputFormatter>());
109
var
binder = CreateBinder(new List<IInputFormatter>());
142
var
binder = CreateBinder(new[] { inputFormatter });
180
var
binder = CreateBinder(new[] { inputFormatter }, treatEmptyInputAsDefaultValueOption);
208
var
binder = CreateBinder(new[] { inputFormatter }, treatEmptyInputAsDefaultValueOption: true);
236
var
binder = CreateBinder(new[] { inputFormatter }, treatEmptyInputAsDefaultValueOption: false);
265
var
binder = CreateBinder(new[] { formatter }, new MvcOptions());
308
var
binder = CreateBinder(new[] { formatter }, new MvcOptions());
337
var
binder = CreateBinder(
379
var
binder = CreateBinder(new[] { formatter }, new MvcOptions());
408
var
binder = CreateBinder(
455
var
binder = CreateBinder(new[] { formatter }, new MvcOptions());
490
var
binder = CreateBinder(new[] { formatter }, new MvcOptions());
523
var
binder = CreateBinder(new[] { formatter }, new MvcOptions());
546
var
binder = CreateBinder(new List<IInputFormatter>());
579
var
binder = CreateBinder(inputFormatters);
605
var
binder = new BodyModelBinder(inputFormatters, new TestHttpRequestStreamReaderFactory(), loggerFactory);
635
var
binder = new BodyModelBinder(inputFormatters, new TestHttpRequestStreamReaderFactory(), loggerFactory);
668
var
binder = new BodyModelBinder(new List<IInputFormatter>(), new TestHttpRequestStreamReaderFactory());
707
private static
BodyModelBinder
CreateBinder(IList<IInputFormatter> formatters, bool treatEmptyInputAsDefaultValueOption = false)
710
var
binder = CreateBinder(formatters, options);
716
private static
BodyModelBinder
CreateBinder(IList<IInputFormatter> formatters, MvcOptions mvcOptions)