Using 'nameof' operator instead of magic strings

This commit is contained in:
Hisham Abdullah Bin Ateya 2015-05-07 16:15:17 +03:00 committed by Chris R
parent ef9dde7d7c
commit 018b4c2426
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Hosting.Server
{
if (string.IsNullOrEmpty(serverFactoryIdentifier))
{
throw new ArgumentException(string.Empty, "serverFactoryIdentifier");
throw new ArgumentException(string.Empty, nameof(serverFactoryIdentifier));
}
var nameParts = HostingUtilities.SplitTypeName(serverFactoryIdentifier);

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Server.Testing
{
if (string.IsNullOrEmpty(applicationPath))
{
throw new ArgumentException("Value cannot be null.", "applicationPath");
throw new ArgumentException("Value cannot be null.", nameof(applicationPath));
}
if (!Directory.Exists(applicationPath))