Add nullability to core project

This commit is contained in:
Nikolaj Geisle
2022-02-09 13:24:35 +01:00
parent 936dd38c55
commit b75eae01f3
259 changed files with 1219 additions and 1112 deletions

View File

@@ -34,7 +34,7 @@ namespace Umbraco.Cms.Core.Cache
{
ClearAllIsolatedCacheByEntityType<IUserGroup>();
var userGroupCache = AppCaches.IsolatedCaches.Get<IUserGroup>();
if (userGroupCache.Success.HasValue && userGroupCache.Success.Value)
if (userGroupCache.Success)
{
userGroupCache.Result?.ClearByKey(CacheKeys.UserGroupGetByAliasCacheKeyPrefix);
}
@@ -54,7 +54,7 @@ namespace Umbraco.Cms.Core.Cache
public override void Remove(int id)
{
var userGroupCache = AppCaches.IsolatedCaches.Get<IUserGroup>();
if (userGroupCache.Success.HasValue && userGroupCache.Success.Value)
if (userGroupCache.Success)
{
userGroupCache.Result?.Clear(RepositoryCacheKeys.GetKey<IUserGroup, int>(id));
userGroupCache.Result?.ClearByKey(CacheKeys.UserGroupGetByAliasCacheKeyPrefix);