Using 'nameof' operator instead of magic strings
This commit is contained in:
parent
ef9dde7d7c
commit
018b4c2426
|
|
@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Hosting.Server
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(serverFactoryIdentifier))
|
if (string.IsNullOrEmpty(serverFactoryIdentifier))
|
||||||
{
|
{
|
||||||
throw new ArgumentException(string.Empty, "serverFactoryIdentifier");
|
throw new ArgumentException(string.Empty, nameof(serverFactoryIdentifier));
|
||||||
}
|
}
|
||||||
|
|
||||||
var nameParts = HostingUtilities.SplitTypeName(serverFactoryIdentifier);
|
var nameParts = HostingUtilities.SplitTypeName(serverFactoryIdentifier);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Server.Testing
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(applicationPath))
|
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))
|
if (!Directory.Exists(applicationPath))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue