Removes CannotSuppressNotificationAttribute
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Umbraco.Cms.Core.Events
|
||||
throw new ArgumentNullException(nameof(notification));
|
||||
}
|
||||
|
||||
if (CanSuppress(notification) && _isSuppressed)
|
||||
if (_isSuppressed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ namespace Umbraco.Cms.Core.Events
|
||||
throw new ArgumentNullException(nameof(notification));
|
||||
}
|
||||
|
||||
if (CanSuppress(notification) && _isSuppressed)
|
||||
if (_isSuppressed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ namespace Umbraco.Cms.Core.Events
|
||||
throw new ArgumentNullException(nameof(notification));
|
||||
}
|
||||
|
||||
if (CanSuppress(notification) && _isSuppressed)
|
||||
if (_isSuppressed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -99,9 +99,6 @@ namespace Umbraco.Cms.Core.Events
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanSuppress(INotification notification)
|
||||
=> notification.GetType().GetCustomAttribute<CannotSuppressNotificationAttribute>() == null;
|
||||
|
||||
private class Suppressor : IDisposable
|
||||
{
|
||||
private bool _disposedValue;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
internal sealed class CannotSuppressNotificationAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ namespace Umbraco.Cms.Core.Notifications
|
||||
{
|
||||
|
||||
[Obsolete("This is only used for the internal cache and will change, use saved notifications instead")]
|
||||
[CannotSuppressNotification]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class ContentRefreshNotification : EntityRefreshNotification<IContent>
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications
|
||||
{
|
||||
[CannotSuppressNotification]
|
||||
[Obsolete("This is only used for the internal cache and will change, use tree change notifications instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class MediaRefreshNotification : EntityRefreshNotification<IMedia>
|
||||
|
||||
@@ -5,7 +5,6 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications
|
||||
{
|
||||
[CannotSuppressNotification]
|
||||
[Obsolete("This is only used for the internal cache and will change, use tree change notifications instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class MemberRefreshNotification : EntityRefreshNotification<IMember>
|
||||
|
||||
@@ -5,7 +5,6 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications
|
||||
{
|
||||
[CannotSuppressNotification]
|
||||
[Obsolete("This is only used for the internal cache and will change, use tree change notifications instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class ScopedEntityRemoveNotification : ObjectNotification<IContentBase>
|
||||
|
||||
Reference in New Issue
Block a user