Fixed ArgumentExceptions

This commit is contained in:
ClemensF 2021-02-11 23:34:37 +01:00
parent 87ff5043f6
commit d4f5456dd5
10 changed files with 36 additions and 35 deletions

View file

@ -18,17 +18,17 @@ namespace MapControl
{
if (string.IsNullOrEmpty(identifier))
{
throw new ArgumentException("The parameter identifier must not be null or empty.");
throw new ArgumentException("The identifier argument must not be null or empty.", nameof(identifier));
}
if (string.IsNullOrEmpty(supportedCrs))
{
throw new ArgumentException("The parameter supportedCrs must not be null or empty.");
throw new ArgumentException("The supportedCrs argument must not be null or empty.", nameof(supportedCrs));
}
if (tileMatrixes == null || tileMatrixes.Count() <= 0)
if (tileMatrixes == null || !tileMatrixes.Any())
{
throw new ArgumentException("The parameter tileMatrixes must not be null or an empty collection.");
throw new ArgumentException("The tileMatrixes argument must not be null or an empty collection.", nameof(tileMatrixes));
}
Identifier = identifier;