This commit is contained in:
ClemensF 2020-04-16 23:15:03 +02:00
parent 3ffb613f80
commit 310f0cca9a
21 changed files with 51 additions and 86 deletions

View file

@ -147,9 +147,7 @@ namespace MapControl.Caching
throw new ArgumentNullException("The parameter key must not be null.");
}
var imageCacheItem = value as ImageCacheItem;
if (imageCacheItem == null)
if (!(value is ImageCacheItem imageCacheItem))
{
throw new ArgumentException("The parameter value must be a MapControl.Caching.ImageCacheItem instance.");
}