public void Execute(WebServicePublisherConfig config) { Container.RegisterInstance(config, If <WebServicePublisherConfig> .IsNotRegistered); if (!Container.IsRegistered <INotificationRepository>()) { var repoConfig = new FileSystemNotificationRepositoryConfig { BaseFolder = config.BaseFolder }; Container.RegisterInstance(repoConfig); Container.RegisterAsTransient <INotificationRepository>( typeof(FileSystemNotificationRepository)); } if (!Container.IsRegistered <IWebServicePublisherStrategy>()) { var clientConfig = new WolfpackWebServicesClientConfig(); clientConfig.InjectFrom <LoopValueInjection>(config); Container.RegisterInstance(clientConfig); Container.RegisterAsTransient <IWolfpackWebServicesClient>(typeof(WolfpackWebServicesClient)); Container.RegisterAll <IPipelineStep <WebServicePublisherContext> >(); Container.RegisterAsTransient <IWebServicePublisherStrategy>( typeof(WebServicePublisherStrategy)); } }
public WolfpackWebServicesClient(WolfpackWebServicesClientConfig config) { _config = config; _client = new RestClient(config.BaseUrl); }