Exemplo n.º 1
0
        public void Execute(WebServiceActivityConfig config)
        {
            var tracker = new ActivityTracker();

            Container.RegisterInstance(tracker);
            Container.RegisterAsSingleton <IWebServiceExtender>(typeof(CoreServicesExtender));

            if (!Container.IsRegistered <IWebServiceReceiverStrategy>())
            {
                if (!Container.IsRegistered <INotificationRepository>())
                {
                    var repoConfig = new FileSystemNotificationRepositoryConfig
                    {
                        BaseFolder = SmartLocation.GetLocation("_notifications")
                    };
                    Container.RegisterInstance(repoConfig);
                    Container.RegisterAsTransient <INotificationRepository>(
                        typeof(FileSystemNotificationRepository));
                }

                if (!Container.IsRegistered <MessageStalenessCheckConfig>())
                {
                    Container.RegisterAsSingleton(typeof(MessageStalenessCheckConfig));
                }

                Container.RegisterAll <IPipelineStep <WebServiceReceiverContext> >();
                Container.RegisterAsTransient <IWebServiceReceiverStrategy>(typeof(WebServiceReceiverStrategy));
            }
        }
Exemplo n.º 2
0
        public WebServiceActivity(WebServiceActivityConfig config,
                                  ActivityTracker tracker,
                                  IEnumerable <IWebServiceExtender> extenders)
        {
            _config    = config;
            _tracker   = tracker;
            _extenders = extenders;

            _config.BaseUrl  = _config.BaseUrl.TrimEnd('/');
            _config.BaseUrl += "/";
        }