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);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"Microsoft.Extensions.WebEncoders": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
"net451": {},
|
||||
"dotnet5.4": {}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue