Using [NotNull]

This commit is contained in:
Hisham Abdullah Bin Ateya 2015-05-06 19:15:58 +03:00
parent ece9a50883
commit 730124063f
3 changed files with 3 additions and 7 deletions

View File

@ -23,13 +23,9 @@ namespace Microsoft.AspNet.Cors.Core
return _defaultPolicyName;
}
[param: NotNull]
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}
_defaultPolicyName = value;
}
}

View File

@ -96,7 +96,7 @@ namespace Microsoft.AspNet.Cors.Core
{
if (value < TimeSpan.Zero)
{
throw new ArgumentOutOfRangeException("value", Resources.PreflightMaxAgeOutOfRange);
throw new ArgumentOutOfRangeException(nameof(value), Resources.PreflightMaxAgeOutOfRange);
}
_preflightMaxAge = value;

View File

@ -59,7 +59,7 @@ namespace Microsoft.AspNet.Cors.Core
{
if (value < TimeSpan.Zero)
{
throw new ArgumentOutOfRangeException("value", Resources.PreflightMaxAgeOutOfRange);
throw new ArgumentOutOfRangeException(nameof(value), Resources.PreflightMaxAgeOutOfRange);
}
_preflightMaxAge = value;
}