Merge pull request #17 from hishamco/dev

Using [NotNull]
This commit is contained in:
Eilon Lipton 2015-06-17 20:44:13 -07:00
commit 361225aec7
3 changed files with 3 additions and 7 deletions

View File

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

View File

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

View File

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