17 implementations of SendFileAsync
Microsoft.AspNetCore.Http (1)
StreamResponseBodyFeature.cs (1)
86public virtual async Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellationToken)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateFactoryTests.cs (1)
3763public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellationToken = default)
SendFileResponseExtensionsTests.cs (1)
123public Task SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
Microsoft.AspNetCore.Http.Results.Tests (2)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
443public Task SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
546public Task SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
Microsoft.AspNetCore.HttpLogging (1)
ResponseBufferingStream.cs (1)
148public async Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellation)
Microsoft.AspNetCore.Mvc.Core.Test (2)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
443public Task SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
546public Task SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
229Task IHttpResponseBodyFeature.SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
ResponseCachingBenchmark.cs (1)
130public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionBody.cs (1)
285public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellation)
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1363public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellation)
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
487async Task IHttpResponseBodyFeature.SendFileAsync(string path, long offset, long? length, CancellationToken cancellation)
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.FeatureCollection.cs (1)
215Task IHttpResponseBodyFeature.SendFileAsync(string path, long offset, long? count, CancellationToken cancellation)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.FeatureCollection.cs (1)
337Task IHttpResponseBodyFeature.SendFileAsync(string path, long offset, long? count, CancellationToken cancellation)
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
93public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.TestHost (1)
ResponseFeature.cs (1)
143public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellation)
26 references to SendFileAsync
Microsoft.AspNetCore.Http.Extensions (1)
SendFileResponseExtensions.cs (1)
120await sendFile.SendFileAsync(fileName, offset, count, localCancel);
Microsoft.AspNetCore.Http.Results.Tests (1)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
273.Setup(s => s.SendFileAsync(path, 0, null, CancellationToken.None))
Microsoft.AspNetCore.HttpLogging (1)
ResponseBufferingStream.cs (1)
151await _innerBodyFeature.SendFileAsync(path, offset, count, cancellation);
Microsoft.AspNetCore.Mvc.Core.Test (1)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
273.Setup(s => s.SendFileAsync(path, 0, null, CancellationToken.None))
Microsoft.AspNetCore.Owin (1)
OwinEnvironment.cs (1)
90{ OwinConstants.SendFiles.SendAsync, new FeatureMap<IHttpResponseBodyFeature>(feature => new SendFileFunc(feature.SendFileAsync)) },
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionBody.cs (1)
294return _innerBodyFeature.SendFileAsync(path, offset, count, cancellation);
Microsoft.AspNetCore.ResponseCompression.Tests (4)
ResponseCompressionMiddlewareTest.cs (4)
1052return sendFile.SendFileAsync("testfile1kb.txt", 0, null, CancellationToken.None); 1102return sendFile.SendFileAsync("testfile1kb.txt", 0, null, CancellationToken.None); 1152await feature.SendFileAsync("testfile1kb.txt", 0, null, CancellationToken.None); 1367return InnerFeature.SendFileAsync(path, offset, count, cancellation);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (14)
ResponseSendFileTests.cs (14)
45await sendFile.SendFileAsync(string.Empty, 0, null, CancellationToken.None); 68return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 87return sendFile.SendFileAsync(RelativeFilePath, 0, null, CancellationToken.None); 106return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 125sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None).Wait(); 126return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 145return sendFile.SendFileAsync(AbsoluteFilePath, 0, FileLength / 2, CancellationToken.None); 166sendFile.SendFileAsync(AbsoluteFilePath, 1234567, null, CancellationToken.None)); 185sendFile.SendFileAsync(AbsoluteFilePath, 0, 1234567, CancellationToken.None)); 202return sendFile.SendFileAsync(AbsoluteFilePath, 0, 0, CancellationToken.None); 222return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 243return sendFile.SendFileAsync(AbsoluteFilePath, 0, 10, CancellationToken.None); 264return sendFile.SendFileAsync(AbsoluteFilePath, 0, 0, CancellationToken.None); 291return sendFile.SendFileAsync(AbsoluteFilePath, 0, 10, CancellationToken.None);
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
135return _original.SendFileAsync(fileInfo.PhysicalPath!, 0, fileInfo.Length, cancellationToken);
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileMiddlewareTests.cs (1)
87mockSendFile.Setup(m => m.SendFileAsync(It.IsAny<string>(), It.IsAny<long>(), It.IsAny<long?>(), It.IsAny<CancellationToken>()))