Пример #1
0
 public AdminController(
     IOrchardServices services,
     IDisqusCommentUpdateService commentUpdateService)
 {
     this.services             = services;
     this.commentUpdateService = commentUpdateService;
     this.T = NullLocalizer.Instance;
 }
Пример #2
0
 public AdminController(
                        IOrchardServices services,
                        IDisqusCommentUpdateService commentUpdateService)
 {
     this.services = services;
     this.commentUpdateService = commentUpdateService;
     this.T = NullLocalizer.Instance;
 }
        public DisqusUpdateTaskHandler(
                                        IOrchardServices orchardServices,
                                        IScheduledTaskManager taskManager,
                                        IDisqusCommentUpdateService updateService)
        {
            this.Logger = NullLogger.Instance;
            this.taskManager = taskManager;
            this.updateService = updateService;
            this.orchardServices = orchardServices;

            try
            {
                var settings = this.orchardServices.WorkContext.CurrentSite.As<DisqusSettingsPart>();
                if (settings.SyncComments)
                    this.ScheduleNextTask(settings.SyncInterval);
            }
            catch (Exception e)
            {
                this.Logger.Error(e, e.Message);
            }
        }
        public DisqusUpdateTaskHandler(
            IOrchardServices orchardServices,
            IScheduledTaskManager taskManager,
            IDisqusCommentUpdateService updateService)
        {
            this.Logger          = NullLogger.Instance;
            this.taskManager     = taskManager;
            this.updateService   = updateService;
            this.orchardServices = orchardServices;

            try
            {
                var settings = this.orchardServices.WorkContext.CurrentSite.As <DisqusSettingsPart>();
                if (settings.SyncComments)
                {
                    this.ScheduleNextTask(settings.SyncInterval);
                }
            }
            catch (Exception e)
            {
                this.Logger.Error(e, e.Message);
            }
        }