Switching to generations TFMs
This commit is contained in:
parent
50222a8614
commit
4310fa144b
|
|
@ -92,13 +92,14 @@ namespace Microsoft.AspNet.StaticFiles
|
||||||
throw new ArgumentOutOfRangeException(nameof(length), length, string.Empty);
|
throw new ArgumentOutOfRangeException(nameof(length), length, string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DNX451
|
var fileStream = new FileStream(
|
||||||
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64,
|
fileName,
|
||||||
FileOptions.Asynchronous | FileOptions.SequentialScan);
|
FileMode.Open,
|
||||||
#else
|
FileAccess.Read,
|
||||||
// TODO: Bring back async when the contract gets it
|
FileShare.ReadWrite,
|
||||||
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64);
|
bufferSize: 1024 * 64,
|
||||||
#endif
|
options: FileOptions.Asynchronous | FileOptions.SequentialScan);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fileStream.Seek(offset, SeekOrigin.Begin);
|
fileStream.Seek(offset, SeekOrigin.Begin);
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"description": "ASP.NET 5 static files middleware.",
|
"description": "ASP.NET 5 static files middleware.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/aspnet/staticfiles"
|
"url": "git://github.com/aspnet/staticfiles"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
|
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
|
||||||
"Microsoft.AspNet.FileProviders.Abstractions": "1.0.0-*",
|
"Microsoft.AspNet.FileProviders.Abstractions": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-*",
|
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
||||||
"Microsoft.Extensions.WebEncoders": "1.0.0-*"
|
"Microsoft.Extensions.WebEncoders": "1.0.0-*"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnx451": { },
|
"net451": {},
|
||||||
"dnxcore50": { }
|
"dotnet5.4": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue