Merge pull request #60 from hishamco/dev

Using 'nameof' operator instead of magic strings
This commit is contained in:
Eilon Lipton 2015-06-22 07:58:46 -07:00
commit bfb4d07aac
1 changed files with 2 additions and 2 deletions

View File

@ -74,13 +74,13 @@ namespace Microsoft.AspNet.StaticFiles
var fileInfo = new FileInfo(fileName);
if (offset < 0 || offset > fileInfo.Length)
{
throw new ArgumentOutOfRangeException("offset", offset, string.Empty);
throw new ArgumentOutOfRangeException(nameof(offset), offset, string.Empty);
}
if (length.HasValue &&
(length.Value < 0 || length.Value > fileInfo.Length - offset))
{
throw new ArgumentOutOfRangeException("length", length, string.Empty);
throw new ArgumentOutOfRangeException(nameof(length), length, string.Empty);
}
#if DNX451