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);
|
||||
}
|
||||
|
||||
#if DNX451
|
||||
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64,
|
||||
FileOptions.Asynchronous | FileOptions.SequentialScan);
|
||||
#else
|
||||
// TODO: Bring back async when the contract gets it
|
||||
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64);
|
||||
#endif
|
||||
var fileStream = new FileStream(
|
||||
fileName,
|
||||
FileMode.Open,
|
||||
FileAccess.Read,
|
||||
FileShare.ReadWrite,
|
||||
bufferSize: 1024 * 64,
|
||||
options: FileOptions.Asynchronous | FileOptions.SequentialScan);
|
||||
|
||||
try
|
||||
{
|
||||
fileStream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "ASP.NET 5 static files middleware.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/staticfiles"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
|
||||
"Microsoft.AspNet.FileProviders.Abstractions": "1.0.0-*",
|
||||
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Extensions.WebEncoders": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
"version": "1.0.0-*",
|
||||
"description": "ASP.NET 5 static files middleware.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/staticfiles"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
|
||||
"Microsoft.AspNet.FileProviders.Abstractions": "1.0.0-*",
|
||||
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Extensions.WebEncoders": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"dotnet5.4": {}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue