public ChannelModule( IAppConfiguration appConfiguration, IIrcClient freenodeClient, IChannelConfiguration channelConfiguration, IBotUserConfiguration botUserConfiguration, IStalkNodeFactory stalkNodeFactory, ISubscriptionHelper subscriptionHelper, IFlagService flagService ) : base(appConfiguration, freenodeClient) { this.channelConfiguration = channelConfiguration; this.botUserConfiguration = botUserConfiguration; this.stalkNodeFactory = stalkNodeFactory; this.subscriptionHelper = subscriptionHelper; this.flagService = flagService; this.Get["/channels"] = this.GetChannelList; this.Get["/channels/{channel}"] = this.GetChannelInfo; this.Get["/channels/{channel}/new"] = this.NewStalk; this.Post["/channels/{channel}/new"] = this.PostNewStalk; this.Post["/channels/{channel}/subscribe"] = this.ChannelSubscribe; this.Post["/channels/{channel}/unsubscribe"] = this.ChannelUnsubscribe; this.Get["/channels/{channel}/stalk/{stalk}"] = this.GetStalkInfo; this.Get["/channels/{channel}/stalk/{stalk}/edit"] = this.GetStalkInfoForEdit; this.Get["/channels/{channel}/stalk/{stalk}/delete"] = this.GetStalkInfoForDelete; this.Post["/channels/{channel}/stalk/{stalk}/delete"] = this.DeleteStalk; this.Post["/channels/{channel}/stalk/{stalk}/edit"] = this.PostStalkInfo; this.Post["/channels/{channel}/stalk/{stalk}/subscribe"] = this.StalkSubscribe; this.Post["/channels/{channel}/stalk/{stalk}/unsubscribe"] = this.StalkUnsubscribe; }
public RecentChangeHandler( IAppConfiguration appConfig, ILogger logger, IChannelConfiguration channelConfig, IBotUserConfiguration botUserConfiguration, IIrcClient freenodeClient, IEmailHelper emailHelper, INotificationTemplates templates, IEmailTemplateFormatter emailTemplateFormatter, ISubscriptionHelper subscriptionHelper) { this.appConfig = appConfig; this.logger = logger; this.channelConfig = channelConfig; this.botUserConfiguration = botUserConfiguration; this.freenodeClient = freenodeClient; this.emailHelper = emailHelper; this.templates = templates; this.emailTemplateFormatter = emailTemplateFormatter; this.subscriptionHelper = subscriptionHelper; if (this.appConfig.EmailConfiguration == null) { this.logger.Warn("Not sending email; email configuration is disabled"); } }
public DefaultModule( IChannelConfiguration channelConfiguration, ISubscriptionHelper subscriptionHelper, IAppConfiguration appConfiguration, IIrcClient client) : base(appConfiguration, client) { this.channelConfiguration = channelConfiguration; this.subscriptionHelper = subscriptionHelper; this.Get["/"] = this.MainPage; this.Get["/about"] = this.AboutPage; }
public ISubscription RegisterSubscription <T>(T instance, Action <ISubscriberConfigurator> configure = null) { SubscriberConfigurator configurator = _createSubscriberConfigurator(configure); IModel model = _connection.CreateModel(); string queue = CreateQueue(model, configurator); IMessageConsumer consumer = CreateConsumer(model, configurator); ISubscriptionHelper helper = CreateSubscriptionHelper(consumer, model, queue, configurator); return(new Subscription(model, queue, consumer, instance, configurator, helper)); }
public ChannelCommand( string commandSource, IUser user, IList <string> arguments, ILogger logger, IFlagService flagService, IConfigurationProvider configurationProvider, IIrcClient client, IChannelConfiguration channelConfiguration, IBotUserConfiguration botUserConfiguration, IAppConfiguration appConfig, ISubscriptionHelper subscriptionHelper) : base(commandSource, user, arguments, logger, flagService, configurationProvider, client) { this.channelConfiguration = channelConfiguration; this.botUserConfiguration = botUserConfiguration; this.appConfig = appConfig; this.subscriptionHelper = subscriptionHelper; }
public StalkCommand( string commandSource, IUser user, IList <string> arguments, ILogger logger, IFlagService flagService, IConfigurationProvider configurationProvider, IIrcClient client, IChannelConfiguration channelConfiguration, IStalkNodeFactory stalkNodeFactory, IAppConfiguration config, INotificationTemplates templates, IEmailHelper emailHelper, IXmlCacheService xmlCacheService, IBotUserConfiguration botUserConfiguration, ISubscriptionHelper subscriptionHelper, IIrcClient wikimediaClient, IEmailTemplateFormatter emailTemplateFormatter ) : base( commandSource, user, arguments, logger, flagService, configurationProvider, client) { this.channelConfiguration = channelConfiguration; this.config = config; this.templates = templates; this.emailHelper = emailHelper; this.xmlCacheService = xmlCacheService; this.botUserConfiguration = botUserConfiguration; this.subscriptionHelper = subscriptionHelper; this.wikimediaClient = wikimediaClient; this.emailTemplateFormatter = emailTemplateFormatter; this.stalkNodeFactory = stalkNodeFactory; }
public Subscription(IModel model, string queue, IMessageConsumer consumer, object instance, SubscriberConfigurator configurator, ISubscriptionHelper helper) : base(model, queue, consumer, configurator) { helper.RegisterSubscription(instance); }
public Subscriber(IModel model, string queue, IMessageConsumer consumer, ISubscriptionHelper helper, SubscriberConfigurator configurator) : base(model, queue, consumer, configurator) { _helper = helper; }
public QueueProcessorService(ISubscriptionHelper subscriptionHelper) { _subscriptionHelper = subscriptionHelper; }