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