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)); } }
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; }
public AfcCountCommand( string commandSource, IUser user, IList <string> arguments, ILogger logger, IFlagService flagService, IConfigurationProvider configurationProvider, IIrcClient client, ISession databaseSession, IMediaWikiApiHelper apiHelper, IDraftStatusService draftStatusService, IResponder responder ) : base( commandSource, user, arguments, logger, flagService, configurationProvider, client) { this.databaseSession = databaseSession; this.apiHelper = apiHelper; this.draftStatusService = draftStatusService; this.responder = responder; }
public InterwikiCommand( string commandSource, IUser user, IList <string> arguments, ILogger logger, IFlagService flagService, IConfigurationProvider configurationProvider, IIrcClient client, ISession session, IMediaWikiApiHelper apiHelper, IResponder responder, IInterwikiService interwikiService) : base( commandSource, user, arguments, logger, flagService, configurationProvider, client) { this.session = session; this.apiHelper = apiHelper; this.responder = responder; this.interwikiService = interwikiService; }
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; }
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); } }
/// <summary> /// Initialises a new instance of the <see cref="LinkerService"/> class. /// </summary> public LinkerService( IMediaWikiApiHelper apiHelper, ISession databaseSession, IIrcClient client, ILogger logger, IChannelManagementService channelManagementService) { this.apiHelper = apiHelper; this.databaseSession = databaseSession; this.client = client; this.logger = logger; this.channelManagementService = channelManagementService; this.lastLink = new Dictionary <string, string>(); }
public BlockInformationCommand( string commandSource, IUser user, IList <string> arguments, ILogger logger, IFlagService flagService, IConfigurationProvider configurationProvider, IIrcClient client, ISession databaseSession, IMediaWikiApiHelper apiHelper) : base( commandSource, user, arguments, logger, flagService, configurationProvider, client) { this.databaseSession = databaseSession; this.apiHelper = apiHelper; }