public WebServicePublisher(WebServicePublisherConfig config, INotificationRepository notificationRepository, IWebServicePublisherStrategy strategy) : base(new IntervalSchedulerConfig { IntervalInSeconds = config.SendIntervalInSeconds ?? WebServicePublisherConfig.DefaultSendInterval }) { _config = config; _notificationRepository = notificationRepository; _strategy = strategy; }
public void TheWebServicePublisherClientActivityIsLoaded() { var config = new WebServicePublisherConfig { Enabled = true, BaseUrl = BaseUrl, BaseFolder = "_outbox", ApiKey = _clientApiKey }; Agent.Run(new BootstrapperRunner <WebServicePublisherConfig, WebServicePublisherBootstrapper>(config)); Agent.Run(agent => { // iactivityplugins are usually autoregistered by infrastructure Container.RegisterAsSingleton <IActivityPlugin>(typeof(WebServicePublisher)); var publisher = Container.Resolve <IActivityPlugin, WebServicePublisher>(); agent.Run(publisher); }); }