3 instantiations of InputFormatterResult
Microsoft.AspNetCore.Mvc.Abstractions (3)
Formatters\InputFormatterResult.cs (3)
11
private static readonly InputFormatterResult _failure = new
InputFormatterResult
(hasError: true);
12
private static readonly InputFormatterResult _noValue = new
InputFormatterResult
(hasError: false);
82
return new
InputFormatterResult
(model);
41 references to InputFormatterResult
Microsoft.AspNetCore.Mvc.Abstractions (24)
Formatters\IInputFormatter.cs (1)
27
Task<
InputFormatterResult
> ReadAsync(InputFormatterContext context);
Formatters\InputFormatterContext.cs (1)
86
/// <see cref="
InputFormatterResult
.NoValueAsync()"/>. If <see langword="true"/>, the input
Formatters\InputFormatterResult.cs (22)
11
private static readonly
InputFormatterResult
_failure = new InputFormatterResult(hasError: true);
12
private static readonly
InputFormatterResult
_noValue = new InputFormatterResult(hasError: false);
13
private static readonly Task<
InputFormatterResult
> _failureAsync = Task.FromResult(_failure);
14
private static readonly Task<
InputFormatterResult
> _noValueAsync = Task.FromResult(_noValue);
46
/// Returns an <see cref="
InputFormatterResult
"/> indicating the <see cref="IInputFormatter.ReadAsync"/>
50
/// An <see cref="
InputFormatterResult
"/> indicating the <see cref="IInputFormatter.ReadAsync"/>
53
public static
InputFormatterResult
Failure()
59
/// Returns a <see cref="Task"/> that on completion provides an <see cref="
InputFormatterResult
"/> indicating
63
/// A <see cref="Task"/> that on completion provides an <see cref="
InputFormatterResult
"/> indicating the
66
public static Task<
InputFormatterResult
> FailureAsync()
72
/// Returns an <see cref="
InputFormatterResult
"/> indicating the <see cref="IInputFormatter.ReadAsync"/>
77
/// An <see cref="
InputFormatterResult
"/> indicating the <see cref="IInputFormatter.ReadAsync"/>
80
public static
InputFormatterResult
Success(object? model)
86
/// Returns a <see cref="Task"/> that on completion provides an <see cref="
InputFormatterResult
"/> indicating
91
/// A <see cref="Task"/> that on completion provides an <see cref="
InputFormatterResult
"/> indicating the
94
public static Task<
InputFormatterResult
> SuccessAsync(object? model)
100
/// Returns an <see cref="
InputFormatterResult
"/> indicating the <see cref="IInputFormatter.ReadAsync"/>
104
/// An <see cref="
InputFormatterResult
"/> indicating the <see cref="IInputFormatter.ReadAsync"/>
107
public static
InputFormatterResult
NoValue()
113
/// Returns a <see cref="Task"/> that on completion provides an <see cref="
InputFormatterResult
"/> indicating
117
/// A <see cref="Task"/> that on completion provides an <see cref="
InputFormatterResult
"/> indicating the
120
public static Task<
InputFormatterResult
> NoValueAsync()
Microsoft.AspNetCore.Mvc.Core (13)
Formatters\InputFormatter.cs (4)
92
public virtual Task<
InputFormatterResult
> ReadAsync(InputFormatterContext context)
104
return
InputFormatterResult
.SuccessAsync(GetDefaultValueForType(context.ModelType));
107
return
InputFormatterResult
.NoValueAsync();
118
public abstract Task<
InputFormatterResult
> ReadRequestBodyAsync(InputFormatterContext context);
Formatters\SystemTextJsonInputFormatter.cs (5)
58
public sealed override async Task<
InputFormatterResult
> ReadRequestBodyAsync(
98
return
InputFormatterResult
.Failure();
108
return
InputFormatterResult
.Failure();
124
return
InputFormatterResult
.NoValue();
129
return
InputFormatterResult
.Success(model);
Formatters\TextInputFormatter.cs (3)
35
public override Task<
InputFormatterResult
> ReadRequestBodyAsync(InputFormatterContext context)
48
return
InputFormatterResult
.FailureAsync();
60
public abstract Task<
InputFormatterResult
> ReadRequestBodyAsync(
ModelBinding\Binders\BodyModelBinder.cs (1)
155
var
result = await formatter.ReadAsync(formatterContext);
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
XmlDataContractSerializerInputFormatter.cs (2)
99
public override async Task<
InputFormatterResult
> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
157
return
InputFormatterResult
.Success(deserializedObject);
XmlSerializerInputFormatter.cs (2)
81
public override async Task<
InputFormatterResult
> ReadRequestBodyAsync(
141
return
InputFormatterResult
.Success(deserializedObject);