public void Should_CreateMessageBusWithInMemoryTransport()
        {
            var busControl = TransportFactory.Create(
                TransportType.InMemory,
                (_) => { }
                );

            Assert.IsType <MassTransitBus>(busControl);
        }
        public void Should_CreateMessageBusWithAzureServiceBusTransport()
        {
            var busControl = TransportFactory.Create(
                TransportType.AzureServiceBus,
                (_) => { }
                );

            Assert.IsType <MassTransitBus>(busControl);
        }
        public void Should_CreateMessageBusWithRabbitMqBusTransport()
        {
            var busControl = TransportFactory.Create(
                TransportType.RabbitMq,
                (_) => { }
                );

            Console.WriteLine(busControl.GetType());

            Assert.IsType <MassTransitBus>(busControl);
        }
        private ITransport ObtainImplementation()
        {
            if (implementation != null)
                return implementation;

            lock (sync)
            {
                if (implementation != null)
                    return implementation;

                return implementation = TransportFactory.Create(settings, log);
            }
        }
Пример #5
0
 public ConnectionController()
 {
     CurrentTransport = TransportFactory.Create(TransportType.WebSocket);
     CurrentTransport.ConnectionStateChanged += HandleConnectionStateChanged;
     CurrentTransport.ConnectionOpened       += HandleConnectionOpened;
 }
Пример #6
0
 private Program()
 {
     WorkFolder      = Properties.Settings.Default.AppWorkFolder;             Log.get().Info("WorkFolder: " + WorkFolder);
     RequestInterval = Properties.Settings.Default.AppRequestInterval;   Log.get().Info("RequestInterval: " + RequestInterval);
     transport       = TransportFactory.Create();                              Log.get().Info("Transport: " + transport);
 }