Exemplo n.º 1
0
 public DraftStatusCommand(
     string commandSource,
     IUser user,
     IList <string> arguments,
     ILogger logger,
     IFlagService flagService,
     IConfigurationProvider configurationProvider,
     IIrcClient client,
     AfcCategoryConfiguration categoryConfiguration,
     IMediaWikiApiHelper apiHelper,
     ISession databaseSession,
     IDraftStatusService draftStatusService, ILinkerService linkerService, IUrlShorteningService urlShorteningService) : base(
         commandSource,
         user,
         arguments,
         logger,
         flagService,
         configurationProvider,
         client)
 {
     this.categoryConfiguration = categoryConfiguration;
     this.apiHelper             = apiHelper;
     this.databaseSession       = databaseSession;
     this.draftStatusService    = draftStatusService;
     this.linkerService         = linkerService;
     this.urlShorteningService  = urlShorteningService;
 }
Exemplo n.º 2
0
        public CategoryWatcherHelperService(
            ILinkerService linkerService,
            IUrlShorteningService urlShorteningService,
            ISession session,
            ILogger logger,
            ICommandParser commandParser,
            IMediaWikiApiHelper apiHelper,
            IResponder responder)
        {
            this.linkerService        = linkerService;
            this.urlShorteningService = urlShorteningService;
            this.session   = session;
            this.logger    = logger;
            this.apiHelper = apiHelper;
            this.responder = responder;

            lock (this.session)
            {
                this.watchedCategories = this.session.CreateCriteria <WatchedCategory>().List <WatchedCategory>();

                this.ignoredPages = this.session.CreateCriteria <IgnoredPage>()
                                    .List <IgnoredPage>()
                                    .Select(x => x.Title)
                                    .ToList();
            }

            logger.DebugFormat("Registering CategoryWatcher keys in CommandParser");
            foreach (var category in this.watchedCategories)
            {
                commandParser.RegisterCommand(category.Keyword, typeof(ForceUpdateCommand));
            }
        }
Exemplo n.º 3
0
 public UserInfoCommand(
     string commandSource,
     IUser user,
     IList <string> arguments,
     ILogger logger,
     IFlagService flagService,
     IConfigurationProvider configurationProvider,
     IIrcClient client,
     ISession databaseSession,
     ILinkerService linkerService,
     IUrlShorteningService urlShortener,
     IMediaWikiApiHelper apiHelper,
     IResponder responder) : base(
         commandSource,
         user,
         arguments,
         logger,
         flagService,
         configurationProvider,
         client)
 {
     this.databaseSession = databaseSession;
     this.linkerService   = linkerService;
     this.urlShortener    = urlShortener;
     this.apiHelper       = apiHelper;
     this.responder       = responder;
 }
Exemplo n.º 4
0
        public BlockMonitoringService(
            ILogger logger,
            ILinkerService linkerService,
            IUrlShorteningService urlShorteningService,
            ISession globalSession,
            IMediaWikiApiHelper apiHelper,
            BotConfiguration botConfiguration,
            IWebServiceClient webServiceClient,
            IIrcClient client,
            ITrollMonitoringService trollMonitoringService)
        {
            this.logger                 = logger;
            this.linkerService          = linkerService;
            this.urlShorteningService   = urlShorteningService;
            this.globalSession          = globalSession;
            this.apiHelper              = apiHelper;
            this.botConfiguration       = botConfiguration;
            this.webServiceClient       = webServiceClient;
            this.client                 = client;
            this.trollMonitoringService = trollMonitoringService;

            this.trollMonitoringService.BlockMonitoringService = this;

            // initialise the store
            foreach (var blockMonitor in globalSession.CreateCriteria <BlockMonitor>().List <BlockMonitor>())
            {
                if (!this.monitors.ContainsKey(blockMonitor.MonitorChannel))
                {
                    this.monitors[blockMonitor.MonitorChannel] = new HashSet <string>();
                }

                this.monitors[blockMonitor.MonitorChannel].Add(blockMonitor.ReportChannel);
            }
        }
 public MainController(ILinkerView view, IPathValidation pathValidator, ILinkerService linkerService, Func<WorkerController> workerFactory, IOperationValidation operationValidation)
 {
     _view = view;
     _pathValidator = pathValidator;
     _linkerService = linkerService;
     _workerFactory = workerFactory;
     _operationValidation = operationValidation;
 }
Exemplo n.º 6
0
 public MainController(ILinkerView view, IPathValidation pathValidator, ILinkerService linkerService, Func <WorkerController> workerFactory, IOperationValidation operationValidation)
 {
     _view                = view;
     _pathValidator       = pathValidator;
     _linkerService       = linkerService;
     _workerFactory       = workerFactory;
     _operationValidation = operationValidation;
 }
        public LinkerControlViewModel(ILogger logger, ILinkerService linkerService)
            : base(logger)
        {
            AnalyseCommand            = new RelayCommand(OnAnalyze);
            LinkCommand               = new RelayCommand(OnLink);
            ClearCommand              = new RelayCommand(OnClear);
            ChangeAllSelectionCommand = new RelayCommand(OnChangeAllSelection);
            DiscardCommand            = new RelayCommand(OnDiscard);

            _linkerService = linkerService;
        }
Exemplo n.º 8
0
 public LinkCommand(
     string commandSource,
     IUser user,
     IList <string> arguments,
     ILogger logger,
     IFlagService flagService,
     IConfigurationProvider configurationProvider,
     IIrcClient client,
     ILinkerService linkerService,
     IChannelManagementService channelManagementService) : base(
         commandSource,
         user,
         arguments,
         logger,
         flagService,
         configurationProvider,
         client)
 {
     this.linkerService            = linkerService;
     this.channelManagementService = channelManagementService;
 }
 public WorkerController(ILinkerService linker, IWorkingView view)
 {
     _linker = linker;
     _view = view;
 }
Exemplo n.º 10
0
 public WorkerController(ILinkerService linker, IWorkingView view)
 {
     _linker = linker;
     _view   = view;
 }