using System.Collections.Generic; namespace Umbraco.Cms.Core.Notifications { public static class NotificationExtensions { public static T WithState(this T notification, IDictionary? state) where T : IStatefulNotification { notification.State = state!; return notification; } public static T WithStateFrom(this T notification, TSource source) where T : IStatefulNotification where TSource : IStatefulNotification => notification.WithState(source.State); } }