diff --git a/src/Microsoft.AspNet.StaticFiles/FileExtensionContentTypeProvider.cs b/src/Microsoft.AspNet.StaticFiles/FileExtensionContentTypeProvider.cs index 176f1b3e34..0e52f8b55b 100644 --- a/src/Microsoft.AspNet.StaticFiles/FileExtensionContentTypeProvider.cs +++ b/src/Microsoft.AspNet.StaticFiles/FileExtensionContentTypeProvider.cs @@ -404,7 +404,7 @@ namespace Microsoft.AspNet.StaticFiles { if (mapping == null) { - throw new ArgumentNullException("mapping"); + throw new ArgumentNullException(nameof(mapping)); } Mappings = mapping; } diff --git a/src/Microsoft.AspNet.StaticFiles/FileServerExtensions.cs b/src/Microsoft.AspNet.StaticFiles/FileServerExtensions.cs index 5eaeb619e1..52e9193cee 100644 --- a/src/Microsoft.AspNet.StaticFiles/FileServerExtensions.cs +++ b/src/Microsoft.AspNet.StaticFiles/FileServerExtensions.cs @@ -56,7 +56,7 @@ namespace Microsoft.AspNet.Builder { if (options == null) { - throw new ArgumentNullException("options"); + throw new ArgumentNullException(nameof(options)); } if (options.EnableDefaultFiles) diff --git a/src/Microsoft.AspNet.StaticFiles/HtmlDirectoryFormatter.cs b/src/Microsoft.AspNet.StaticFiles/HtmlDirectoryFormatter.cs index 8aadaefc6c..6e1f816ca5 100644 --- a/src/Microsoft.AspNet.StaticFiles/HtmlDirectoryFormatter.cs +++ b/src/Microsoft.AspNet.StaticFiles/HtmlDirectoryFormatter.cs @@ -29,11 +29,11 @@ namespace Microsoft.AspNet.StaticFiles { if (context == null) { - throw new ArgumentNullException("context"); + throw new ArgumentNullException(nameof(context)); } if (contents == null) { - throw new ArgumentNullException("contents"); + throw new ArgumentNullException(nameof(contents)); } if (_htmlEncoder == null) diff --git a/src/Microsoft.AspNet.StaticFiles/Infrastructure/SharedOptionsBase.cs b/src/Microsoft.AspNet.StaticFiles/Infrastructure/SharedOptionsBase.cs index c0e73a2f7e..9f502f2cfe 100644 --- a/src/Microsoft.AspNet.StaticFiles/Infrastructure/SharedOptionsBase.cs +++ b/src/Microsoft.AspNet.StaticFiles/Infrastructure/SharedOptionsBase.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.StaticFiles.Infrastructure { if (sharedOptions == null) { - throw new ArgumentNullException("sharedOptions"); + throw new ArgumentNullException(nameof(sharedOptions)); } SharedOptions = sharedOptions; diff --git a/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs b/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs index 3617158bbd..36f260742e 100644 --- a/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs +++ b/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs @@ -63,7 +63,7 @@ namespace Microsoft.AspNet.StaticFiles if (string.IsNullOrWhiteSpace(fileName)) { - throw new ArgumentNullException("fileName"); + throw new ArgumentNullException(nameof(fileName)); } if (!File.Exists(fileName)) {