From 7c30f26505141bdfbd8aa55c0bc36053fa561f25 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 8 May 2014 11:38:05 +1000 Subject: [PATCH] Fixes: U4-4845 Publicize INotificationService --- src/Umbraco.Core/Models/Notification.cs | 2 +- src/Umbraco.Core/Services/INotificationService.cs | 2 +- src/Umbraco.Core/Services/NotificationService.cs | 2 +- src/Umbraco.Core/Services/ServiceContext.cs | 10 ++++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Models/Notification.cs b/src/Umbraco.Core/Models/Notification.cs index e5d3236b5e..351b60039e 100644 --- a/src/Umbraco.Core/Models/Notification.cs +++ b/src/Umbraco.Core/Models/Notification.cs @@ -5,7 +5,7 @@ using System.Text; namespace Umbraco.Core.Models { - internal class Notification + public class Notification { public Notification(int entityId, int userId, string action, Guid entityType) { diff --git a/src/Umbraco.Core/Services/INotificationService.cs b/src/Umbraco.Core/Services/INotificationService.cs index 4be6d17f0d..c067b2d615 100644 --- a/src/Umbraco.Core/Services/INotificationService.cs +++ b/src/Umbraco.Core/Services/INotificationService.cs @@ -13,7 +13,7 @@ using umbraco.interfaces; namespace Umbraco.Core.Services { - internal interface INotificationService : IService + public interface INotificationService : IService { /// /// Sends the notifications for the specified user regarding the specified node and action. diff --git a/src/Umbraco.Core/Services/NotificationService.cs b/src/Umbraco.Core/Services/NotificationService.cs index b59f672590..6dd9017924 100644 --- a/src/Umbraco.Core/Services/NotificationService.cs +++ b/src/Umbraco.Core/Services/NotificationService.cs @@ -19,7 +19,7 @@ using umbraco.interfaces; namespace Umbraco.Core.Services { - internal class NotificationService : INotificationService + public class NotificationService : INotificationService { private readonly IDatabaseUnitOfWorkProvider _uowProvider; private readonly IUserService _userService; diff --git a/src/Umbraco.Core/Services/ServiceContext.cs b/src/Umbraco.Core/Services/ServiceContext.cs index 7a9add5c2e..f358e41bf3 100644 --- a/src/Umbraco.Core/Services/ServiceContext.cs +++ b/src/Umbraco.Core/Services/ServiceContext.cs @@ -48,6 +48,10 @@ namespace Umbraco.Core.Services /// /// /// + /// + /// + /// + /// public ServiceContext( IContentService contentService, IMediaService mediaService, @@ -64,7 +68,8 @@ namespace Umbraco.Core.Services IUserService userService, ISectionService sectionService, IApplicationTreeService treeService, - ITagService tagService) + ITagService tagService, + INotificationService notificationService) { _tagService = new Lazy(() => tagService); _contentService = new Lazy(() => contentService); @@ -82,6 +87,7 @@ namespace Umbraco.Core.Services _treeService = new Lazy(() => treeService); _memberService = new Lazy(() => memberService); _userService = new Lazy(() => userService); + _notificationService = new Lazy(() => notificationService); } @@ -174,7 +180,7 @@ namespace Umbraco.Core.Services /// /// Gets the /// - internal INotificationService NotificationService + public INotificationService NotificationService { get { return _notificationService.Value; } }