57 instantiations of OutputFormatterWriteContext
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
72var formatterContext = new OutputFormatterWriteContext(
Infrastructure\ObjectResultExecutor.cs (1)
85var formatterContext = new OutputFormatterWriteContext(
Microsoft.AspNetCore.Mvc.Core.Test (46)
Formatters\JsonOutputFormatterTestBase.cs (4)
40var outputFormatterContext = new OutputFormatterWriteContext( 91var outputFormatterContext = new OutputFormatterWriteContext( 123var outputFormatterContext = new OutputFormatterWriteContext( 184return new OutputFormatterWriteContext(
Formatters\NoContentFormatterTests.cs (6)
41var context = new OutputFormatterWriteContext( 65var context = new OutputFormatterWriteContext( 93var context = new OutputFormatterWriteContext( 118var context = new OutputFormatterWriteContext( 137var context = new OutputFormatterWriteContext( 160var context = new OutputFormatterWriteContext(
Formatters\OutputFormatterTests.cs (4)
16var context = new OutputFormatterWriteContext( 57var context = new OutputFormatterWriteContext( 86var context = new OutputFormatterWriteContext( 209var context = new OutputFormatterWriteContext(
Formatters\StreamOutputFormatterTest.cs (3)
20var context = new OutputFormatterWriteContext( 45var context = new OutputFormatterWriteContext( 71var context = new OutputFormatterWriteContext(
Formatters\StringOutputFormatterTests.cs (5)
45var context = new OutputFormatterWriteContext( 65var context = new OutputFormatterWriteContext( 91var context = new OutputFormatterWriteContext( 113var context = new OutputFormatterWriteContext( 141var context = new OutputFormatterWriteContext(
Formatters\SystemTextJsonOutputFormatterTest.cs (6)
45var outputFormatterContext = new OutputFormatterWriteContext( 73var outputFormatterContext = new OutputFormatterWriteContext( 100var outputFormatterContext = new OutputFormatterWriteContext( 129var outputFormatterContext = new OutputFormatterWriteContext( 191var outputFormatterContext = new OutputFormatterWriteContext( 231var outputFormatterContext = new OutputFormatterWriteContext(
Formatters\TextOutputFormatterTests.cs (8)
53var context = new OutputFormatterWriteContext( 79var formatterContext = new OutputFormatterWriteContext( 101var formatterContext = new OutputFormatterWriteContext( 132var formatterContext = new OutputFormatterWriteContext( 158var formatterContext = new OutputFormatterWriteContext( 189var context = new OutputFormatterWriteContext( 218var context = new OutputFormatterWriteContext( 244var writerContext = new OutputFormatterWriteContext(
Infrastructure\DefaultOutputFormatterSelectorTest.cs (10)
27var context = new OutputFormatterWriteContext( 57var context = new OutputFormatterWriteContext( 86var context = new OutputFormatterWriteContext( 157var context = new OutputFormatterWriteContext( 188var context = new OutputFormatterWriteContext( 216var context = new OutputFormatterWriteContext( 251var context = new OutputFormatterWriteContext( 280var context = new OutputFormatterWriteContext( 309var context = new OutputFormatterWriteContext( 343var context = new OutputFormatterWriteContext(
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
793return new OutputFormatterWriteContext(
XmlSerializerOutputFormatterTest.cs (1)
575return new OutputFormatterWriteContext(
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
NewtonsoftJsonOutputFormatterTest.cs (3)
448var outputFormatterContext = new OutputFormatterWriteContext( 493var outputFormatterContext = new OutputFormatterWriteContext( 527var outputFormatterContext = new OutputFormatterWriteContext(
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (4)
40var outputFormatterContext = new OutputFormatterWriteContext( 91var outputFormatterContext = new OutputFormatterWriteContext( 123var outputFormatterContext = new OutputFormatterWriteContext( 184return new OutputFormatterWriteContext(
178 references to OutputFormatterWriteContext
BasicWebSite (4)
Formatters\CustomFormatter.cs (1)
34public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Formatters\PlainTextFormatter.cs (1)
32public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Formatters\VCardFormatter_V3.cs (1)
29public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Formatters\VCardFormatter_V4.cs (1)
30public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Microsoft.AspNetCore.Mvc.Abstractions (4)
Formatters\IOutputFormatter.cs (1)
24Task WriteAsync(OutputFormatterWriteContext context);
Formatters\OutputFormatterCanWriteContext.cs (1)
37/// <see cref="IOutputFormatter.WriteAsync(OutputFormatterWriteContext)"/>
Formatters\OutputFormatterWriteContext.cs (2)
10/// A context object for <see cref="IOutputFormatter.WriteAsync(OutputFormatterWriteContext)"/>. 15/// Creates a new <see cref="OutputFormatterWriteContext"/>.
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
ApiResponseTypeProviderTest.cs (1)
823public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context) => Task.CompletedTask;
DefaultApiDescriptionProviderTest.cs (1)
2839public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context)
Microsoft.AspNetCore.Mvc.Core (16)
Formatters\HttpNoContentOutputFormatter.cs (1)
34public Task WriteAsync(OutputFormatterWriteContext context)
Formatters\OutputFormatter.cs (3)
157public virtual Task WriteAsync(OutputFormatterWriteContext context) 169public virtual void WriteResponseHeaders(OutputFormatterWriteContext context) 182public abstract Task WriteResponseBodyAsync(OutputFormatterWriteContext context);
Formatters\StreamOutputFormatter.cs (1)
27public async Task WriteAsync(OutputFormatterWriteContext context)
Formatters\StringOutputFormatter.cs (1)
43public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding encoding)
Formatters\SystemTextJsonOutputFormatter.cs (1)
61public sealed override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Formatters\TextOutputFormatter.cs (7)
63public virtual Encoding SelectCharacterEncoding(OutputFormatterWriteContext context) 103public override Task WriteAsync(OutputFormatterWriteContext context) 152public sealed override Task WriteResponseBodyAsync(OutputFormatterWriteContext context) 155$"{nameof(WriteResponseBodyAsync)}({nameof(OutputFormatterWriteContext)})", 157$"{nameof(WriteResponseBodyAsync)}({nameof(OutputFormatterWriteContext)},{nameof(Encoding)})"); 168public abstract Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding); 170internal static IList<StringWithQualityHeaderValue> GetAcceptCharsetHeaderValues(OutputFormatterWriteContext context)
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
72var formatterContext = new OutputFormatterWriteContext(
Infrastructure\ObjectResultExecutor.cs (1)
85var formatterContext = new OutputFormatterWriteContext(
Microsoft.AspNetCore.Mvc.Core.Test (80)
AcceptedAtActionResultTests.cs (3)
125formatter.Setup(f => f.WriteAsync(It.IsAny<OutputFormatterWriteContext>())) 126.Callback((OutputFormatterWriteContext context) => actual = context.Object) 261formatter.Setup(f => f.CanWriteResult(It.IsAny<OutputFormatterWriteContext>())).Returns(true);
AcceptedAtRouteResultTests.cs (3)
56formatter.Setup(f => f.WriteAsync(It.IsAny<OutputFormatterWriteContext>())) 57.Callback((OutputFormatterWriteContext context) => actual = context.Object) 169formatter.Setup(f => f.CanWriteResult(It.IsAny<OutputFormatterWriteContext>())).Returns(true);
AcceptedResultTests.cs (3)
52formatter.Setup(f => f.WriteAsync(It.IsAny<OutputFormatterWriteContext>())) 53.Callback((OutputFormatterWriteContext context) => actual = context.Object) 126formatter.Setup(f => f.CanWriteResult(It.IsAny<OutputFormatterWriteContext>())).Returns(true);
Formatters\FormatterCollectionTest.cs (2)
50public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 58public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Formatters\JsonOutputFormatterTestBase.cs (5)
40var outputFormatterContext = new OutputFormatterWriteContext( 91var outputFormatterContext = new OutputFormatterWriteContext( 123var outputFormatterContext = new OutputFormatterWriteContext( 144var outputFormatterContext = GetOutputFormatterContext( 174protected static OutputFormatterWriteContext GetOutputFormatterContext(
Formatters\NoContentFormatterTests.cs (6)
41var context = new OutputFormatterWriteContext( 65var context = new OutputFormatterWriteContext( 93var context = new OutputFormatterWriteContext( 118var context = new OutputFormatterWriteContext( 137var context = new OutputFormatterWriteContext( 160var context = new OutputFormatterWriteContext(
Formatters\OutputFormatterTests.cs (6)
16var context = new OutputFormatterWriteContext( 57var context = new OutputFormatterWriteContext( 86var context = new OutputFormatterWriteContext( 196public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context) 209var context = new OutputFormatterWriteContext( 238public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context)
Formatters\StreamOutputFormatterTest.cs (3)
20var context = new OutputFormatterWriteContext( 45var context = new OutputFormatterWriteContext( 71var context = new OutputFormatterWriteContext(
Formatters\StringOutputFormatterTests.cs (5)
45var context = new OutputFormatterWriteContext( 65var context = new OutputFormatterWriteContext( 91var context = new OutputFormatterWriteContext( 113var context = new OutputFormatterWriteContext( 141var context = new OutputFormatterWriteContext(
Formatters\SystemTextJsonOutputFormatterTest.cs (6)
45var outputFormatterContext = new OutputFormatterWriteContext( 73var outputFormatterContext = new OutputFormatterWriteContext( 100var outputFormatterContext = new OutputFormatterWriteContext( 129var outputFormatterContext = new OutputFormatterWriteContext( 191var outputFormatterContext = new OutputFormatterWriteContext( 231var outputFormatterContext = new OutputFormatterWriteContext(
Formatters\TextOutputFormatterTests.cs (11)
53var context = new OutputFormatterWriteContext( 79var formatterContext = new OutputFormatterWriteContext( 101var formatterContext = new OutputFormatterWriteContext( 132var formatterContext = new OutputFormatterWriteContext( 158var formatterContext = new OutputFormatterWriteContext( 189var context = new OutputFormatterWriteContext( 218var context = new OutputFormatterWriteContext( 244var writerContext = new OutputFormatterWriteContext( 264public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 279public override Encoding SelectCharacterEncoding(OutputFormatterWriteContext context) 284public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Infrastructure\ControllerActionInvokerTest.cs (2)
1725.Setup(f => f.WriteAsync(It.IsAny<OutputFormatterWriteContext>())) 1726.Returns<OutputFormatterWriteContext>(async c =>
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (2)
188formatter.Setup(f => f.CanWriteResult(It.IsAny<OutputFormatterWriteContext>())).Returns(false); 243public Task WriteAsync(OutputFormatterWriteContext context)
Infrastructure\DefaultOutputFormatterSelectorTest.cs (15)
27var context = new OutputFormatterWriteContext( 57var context = new OutputFormatterWriteContext( 86var context = new OutputFormatterWriteContext( 157var context = new OutputFormatterWriteContext( 188var context = new OutputFormatterWriteContext( 216var context = new OutputFormatterWriteContext( 251var context = new OutputFormatterWriteContext( 280var context = new OutputFormatterWriteContext( 309var context = new OutputFormatterWriteContext( 343var context = new OutputFormatterWriteContext( 386public virtual Task WriteAsync(OutputFormatterWriteContext context) 402public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 418public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 433public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 449public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context)
Infrastructure\ObjectResultExecutorTest.cs (7)
454var formatterContext = formatter.LastOutputFormatterContext; 492public virtual Task WriteAsync(OutputFormatterWriteContext context) 509public OutputFormatterWriteContext LastOutputFormatterContext { get; private set; } 511public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 529public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 544public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) 560public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context)
ObjectResultTests.cs (1)
177public Task WriteAsync(OutputFormatterWriteContext context)
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
XmlDataContractSerializerOutputFormatter.cs (2)
205OutputFormatterWriteContext context, 213public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
XmlSerializerOutputFormatter.cs (2)
184OutputFormatterWriteContext context, 192public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (44)
XmlDataContractSerializerOutputFormatterTest.cs (24)
102var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 124var context = GetOutputFormatterContext(input, typeof(DummyClass)); 160var formatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 191var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 226var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 251var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 282var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType(), 313var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 334var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 352var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 383var outputFormatterContext = GetOutputFormatterContext(input, declaredType); 416var outputFormatterContext = GetOutputFormatterContext(new object(), typeof(object)); 470var outputFormatterContext = GetOutputFormatterContext(sampleInput, typeof(DummyClass)); 487var outputFormatterContext = GetOutputFormatterContext(parent, parent.GetType()); 524var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 571var outputFormatterContext = GetOutputFormatterContext(sampleInput, typeof(DummyClass)); 618var outputFormatterContext = GetOutputFormatterContext(parent, parent.GetType()); 658var outputFormatterContext = GetOutputFormatterContext(new Customer(10), typeof(Customer)); 676var outputFormatterContext = GetOutputFormatterContext(new Customer(10), typeof(Customer)); 707var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 731var outputFormatterContext = GetOutputFormatterContext( 769var outputFormatterContext = GetOutputFormatterContext( 788private OutputFormatterWriteContext GetOutputFormatterContext( 827OutputFormatterWriteContext context,
XmlSerializerOutputFormatterTest.cs (20)
56var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 91var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 111var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 132var context = GetOutputFormatterContext(input, typeof(DummyClass)); 164var formatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 191var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 224var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 247var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 276var outputFormatterContext = 304var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 323var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 356var outputFormatterContext = GetOutputFormatterContext(input, declaredType); 387var outputFormatterContext = GetOutputFormatterContext(new object(), typeof(object)); 406var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 475var outputFormatterContext = GetOutputFormatterContext(new Customer(10), typeof(Customer)); 494var outputFormatterContext = GetOutputFormatterContext(new Customer(10), typeof(Customer)); 513var outputFormatterContext = GetOutputFormatterContext( 551var outputFormatterContext = GetOutputFormatterContext( 570private OutputFormatterWriteContext GetOutputFormatterContext( 617OutputFormatterWriteContext context,
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
NewtonsoftJsonOutputFormatter.cs (3)
126/// <param name="context">A context object for <see cref="IOutputFormatter.WriteAsync(OutputFormatterWriteContext)"/>.</param> 128protected virtual JsonSerializer CreateJsonSerializer(OutputFormatterWriteContext context) 134public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (20)
NewtonsoftJsonOutputFormatterTest.cs (15)
53var outputFormatterContext = GetOutputFormatterContext(person, typeof(User), writerFactory: (stream, encoding) => 94var outputFormatterContext = GetOutputFormatterContext(person, typeof(User), writerFactory: (stream, encoding) => 125var outputFormatterContext = GetOutputFormatterContext(person, typeof(User)); 158var outputFormatterContext1 = GetOutputFormatterContext(person, typeof(User)); 165var outputFormatterContext2 = GetOutputFormatterContext(person, typeof(User)); 199var context = GetOutputFormatterContext(user, typeof(User)); 251var context = GetOutputFormatterContext(dictionary, typeof(Dictionary<string, int>)); 287var context = GetOutputFormatterContext(user, typeof(UserWithJsonProperty)); 322var context = GetOutputFormatterContext(user, typeof(UserWithJsonProperty)); 353var outputFormatterContext = GetOutputFormatterContext( 383var outputFormatterContext = GetOutputFormatterContext( 420var context = GetOutputFormatterContext(user, typeof(User)); 448var outputFormatterContext = new OutputFormatterWriteContext( 493var outputFormatterContext = new OutputFormatterWriteContext( 527var outputFormatterContext = new OutputFormatterWriteContext(
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (5)
40var outputFormatterContext = new OutputFormatterWriteContext( 91var outputFormatterContext = new OutputFormatterWriteContext( 123var outputFormatterContext = new OutputFormatterWriteContext( 144var outputFormatterContext = GetOutputFormatterContext( 174protected static OutputFormatterWriteContext GetOutputFormatterContext(
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
106public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)