public StructureMapRegistry()
        {
            var config = new AFPSTConfiguration();
            //            _unsubscribeActions.Add(_bus.Subscribe<Subscriber<OrderHasBeenShippedMessage>>());
            //            _unsubscribeActions.Add(_bus.Subscribe<FaultSubscriber<OrderHasBeenShippedMessage>>());
            //            _unsubscribeActions.Add(_bus.Subscribe<Subscriber<OrderIsBackorderedMessage>>());
            //            _unsubscribeActions.Add(_bus.Subscribe<Subscriber<OrderRequestReceivedMessage>>());
            //            _unsubscribeActions.Add(_bus.Subscribe<Subscriber<InvoicedOrderMessage>>());
            //            _unsubscribeActions.Add(_bus.Subscribe<FaultSubscriber<InvoicedOrderMessage>>());
            //
            // Adding Ignore Subscriber to remove unwanted messages from queue
            //            _bus.Subscribe<IgnoreSubscriber<OrderHasBeenShippedMessage>>();
            //            _bus.Subscribe<IgnoreSubscriber<OrderRequestReceivedMessage>>();
            //            if(runOnce) Stop();

            For<INotificationSender>().Use<NotificationSender>()
                .Ctor<Queue>("notificationEndpoint").Is(config.GetQueue("EmailServiceHost", "EmailServiceEndpoint"))
                .Ctor<IEndpointCache>().Is(EndpointCacheFactory.New(ecf => ecf.AddTransportFactory<MsmqTransportFactory>()));

            For<IConsumer>().Use<WWTSubscriber<OrderRequestReceivedMessage>>();
            For<IConsumer>().Use<WWTSubscriber<OrderHasBeenShippedMessage>>();
            For<IConsumer>().Use<WWTSubscriber<InvoicedOrderMessage>>();
            For<IConsumer>().Use<Subscriber<OrderRequestReceivedMessage>>();
            For<IConsumer>().Use<Subscriber<OrderHasBeenShippedMessage>>();
            For<IConsumer>().Use<Subscriber<OrderChangeRequestReceivedMessage>>();
            For<IConsumer>().Use<Subscriber<OrderIsBackorderedMessage>>();
            For<IConsumer>().Use<Subscriber<InvoicedOrderMessage>>();
            For<IConsumer>().Use<FaultSubscriber<InvoicedOrderMessage>>();
            For<IConsumer>().Use<FaultSubscriber<OrderHasBeenShippedMessage>>();

            //For<IMessageSender<LabelPrintRequestMessage>>().Use<MessageSender<LabelPrintRequestMessage>>()
            // .Ctor<Queue>("queue").Is(config.GetQueue("reissueLabelQueueHost", "reissueLabelQueue"));
        }
        public EdiDocsInRegistry()
        {
            var config = new AFPSTConfiguration();

            For<INotificationSender>().Use<NotificationSender>()
                .Ctor<Queue>("notificationEndpoint").Is(config.GetQueue("EmailServiceHost", "EmailServiceEndpoint"))
                .Ctor<IEndpointCache>().Is(EndpointCacheFactory.New(ecf => ecf.AddTransportFactory<MsmqTransportFactory>()));
            For<IGenericDocumentParser>().Use<GenericDocParser<OrderRequestReceivedMessage>>();
            For<IInitech850LineParser>().Use<Initech850LineParser>();
            For<ICreateEdiContentFrom<OrderRequestReceivedMessage>>().Use<Initech855Creator>();
            For<ISegmentFactory>().Use<SegmentFactory>().Named("segFactory");
            For<IControlNumberRepository>().Use<ControlNumberRepository>().Named("controlNumRepo");
            For<IAssignDocumentsToPartners>().Use<DocumentPartnerAssigner>();
            For<IBusinessPartnerSpecificServiceResolver>().Use<BusinessPartnerSpecificServiceResolver>();
            For<IFileParser>().Use<InitechFileParser>() ;
            For<IDocumentParser>().Use<Initech850Parser>();
            For<IDocumentParser>().Use<Initech997Parser>();
            For<IEdiMessagePublisher>().Use<CreateOrderMessagePublisher>();
            For<IEdiMessagePublisher>().Use<ChangeOrderMessagePublisher>();
            For<IEdiMessagePublisher>().Use<ShippedOrderMessagePublisher>();
        }