11 instantiations of FileContentResult
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\DownloadPersonalData.cshtml.cs (1)
78return new FileContentResult(JsonSerializer.SerializeToUtf8Bytes(personalData), "application/json");
Areas\Identity\Pages\V5\Account\Manage\DownloadPersonalData.cshtml.cs (1)
78return new FileContentResult(JsonSerializer.SerializeToUtf8Bytes(personalData), "application/json");
Microsoft.AspNetCore.Mvc.Core (6)
ControllerBase.cs (6)
1103=> new FileContentResult(fileContents, contentType) { FileDownloadName = fileDownloadName }; 1118=> new FileContentResult(fileContents, contentType) 1138return new FileContentResult(fileContents, contentType) 1160return new FileContentResult(fileContents, contentType) 1183return new FileContentResult(fileContents, contentType) 1207return new FileContentResult(fileContents, contentType)
Microsoft.AspNetCore.Mvc.Core.Test (1)
FileContentResultTest.cs (1)
26var result = new FileContentResult(buffer, contentType)
Microsoft.AspNetCore.Mvc.RazorPages (2)
PageBase.cs (1)
334=> new FileContentResult(fileContents, contentType) { FileDownloadName = fileDownloadName };
PageModel.cs (1)
666=> new FileContentResult(fileContents, contentType) { FileDownloadName = fileDownloadName };
45 references to FileContentResult
Microsoft.AspNetCore.Mvc.Core (24)
ControllerBase.cs (16)
1072/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1074public virtual FileContentResult File(byte[] fileContents, string contentType) 1086/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1088public virtual FileContentResult File(byte[] fileContents, string contentType, bool enableRangeProcessing) 1100/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1102public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName) 1115/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1117public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, bool enableRangeProcessing) 1134/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1136public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1156/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1158public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1179/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1181public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1203/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 1205public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
239services.TryAddSingleton<IActionResultExecutor<FileContentResult>, FileContentResultExecutor>();
FileContentResult.cs (3)
20/// Creates a new <see cref="FileContentResult"/> instance with 32/// Creates a new <see cref="FileContentResult"/> instance with 66var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<FileContentResult>>();
Infrastructure\FileContentResultExecutor.cs (4)
14public partial class FileContentResultExecutor : FileResultExecutorBase, IActionResultExecutor<FileContentResult> 26public virtual Task ExecuteAsync(ActionContext context, FileContentResult result) 53/// <param name="result">The <see cref="FileContentResult"/>.</param> 56protected virtual Task WriteFileAsync(ActionContext context, FileContentResult result, RangeItemHeaderValue? range, long rangeLength)
Microsoft.AspNetCore.Mvc.Core.Test (7)
ControllerBaseTest.cs (5)
1670var result = controller.File(fileContents, "application/pdf"); 1688var result = controller.File(fileContents, "application/pdf", true); 1712var result = controller.File(fileContents, "application/pdf", lastModified, entityTag, enableRangeProcessing); 1732var result = controller.File(fileContents, "application/pdf", "someDownloadName"); 1756var result = controller.File(fileContents, "application/pdf", "someDownloadName", lastModified, entityTag, enableRangeProcessing);
FileContentResultTest.cs (2)
26var result = new FileContentResult(buffer, contentType) 35.AddSingleton<IActionResultExecutor<FileContentResult>, FileContentResultExecutor>()
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
320/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 321public virtual FileContentResult File(byte[] fileContents, string contentType) 332/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 333public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName)
PageModel.cs (4)
652/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 653public virtual FileContentResult File(byte[] fileContents, string contentType) 664/// <returns>The created <see cref="FileContentResult"/> for the response.</returns> 665public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName)
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
PageModelTest.cs (2)
1379var result = pageModel.File(fileContents, "application/pdf"); 1396var result = pageModel.File(fileContents, "application/pdf", "someDownloadName");
PageTest.cs (2)
1369var result = page.File(fileContents, "application/pdf"); 1386var result = page.File(fileContents, "application/pdf", "someDownloadName");
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
ControllerUnitTestabilityTests.cs (2)
137var fileContentResult = Assert.IsType<FileContentResult>(result);