Ejemplo n.º 1
0
        public MessageReciever(IBusFactory busFactory, IJsonTranslationService translationService)
        {
            this.translationService = translationService;

            var connectionDetails = new BusConnectionDetails("localhost");
            var syncRecieve = SubscriberDetails.Create<SyncronousMessageRequest, SyncronousMessageResponse>(SyncRecieve);
            var asyncRecieve = SubscriberDetails.Create<AsyncronousMessageRequest>(AsyncRecieve);

            busFactory.BootstrapService(connectionDetails, syncRecieve, asyncRecieve );
        }
        public CustomerServiceReciever(IBusFactory busFactory, IJsonTranslationService translationService)
        {
            this.translationService = translationService;

            var connectionDetails = new BusConnectionDetails("localhost");
            var getCustomerDetails = SubscriberDetails.Create<CustomerIdentifier, Customer>(GetCustomer);
            var testDetails = SubscriberDetails.Create<string, string>(Test);
            var addCustomerDetails = SubscriberDetails.Create<Customer>(AddCustomer);

            busFactory.BootstrapService(connectionDetails, getCustomerDetails, addCustomerDetails, testDetails);
        }