예제 #1
0
        public SubscriptionController(
            IOrchardServices orchardServices,
            IForumService forumService,
            IThreadService threadService,
            IPostService postService,
            ISiteService siteService,
            IShapeFactory shapeFactory,
            IAuthorizationService authorizationService,
            IAuthenticationService authenticationService,
            ISubscriptionService subscriptionService,
            IThreadLastReadService threadLastReadService
            )
        {
            _orchardServices = orchardServices;
            _forumService = forumService;
            _threadService = threadService;
            _postService = postService;
            _siteService = siteService;
            _subscriptionService = subscriptionService;
            _authorizationService = authorizationService;
            _authenticationService = authenticationService;
            _threadLastReadService = threadLastReadService;

            T = NullLocalizer.Instance;
            Shape = shapeFactory;
        }
예제 #2
0
        public ForumController(IOrchardServices orchardServices, 
            IForumService forumService,
            IThreadService threadService,
            ISiteService siteService,
            IShapeFactory shapeFactory,
            IThreadLastReadService threadLastReadService
            
         ) {
            _orchardServices = orchardServices;
            _forumService = forumService;
            _threadService = threadService;
            _siteService = siteService;
            _threadLastReadService = threadLastReadService;

            Shape = shapeFactory;
            Logger = NullLogger.Instance;
            T = NullLocalizer.Instance;
        }
 public PurgeLastReadRepositoryTask(
     IScheduledTaskManager taskManager,
     IThreadLastReadService threadLastReadService
 )
 {
   _taskManager = taskManager;
   _threadLastReadService = threadLastReadService;
   Logger = NullLogger.Instance;
   try
   {
       //set the first run a bit in the future so the system doesn't run the task immediately on startup
       DateTime firstDate = DateTime.UtcNow.AddHours(1);
       //for testing
       //DateTime firstDate = DateTime.UtcNow.AddMinutes(2);
       ScheduleNextTask(firstDate);
   }
   catch(Exception e)
   {
      this.Logger.Error(e,e.Message);
   }
 }