Example #1
0
 public Handle(HostReceiveEndpointHandle[] handles, IBusHostControl host, IAgent hostAgent, Task connectionTask)
 {
     _host           = host;
     _handles        = handles;
     _hostAgent      = hostAgent;
     _connectionTask = connectionTask;
 }
Example #2
0
        public bool TryGetHost(Uri address, out IBusHostControl host)
        {
            if (TryGetHost(address, out TConfiguration hostConfiguration))
            {
                host = hostConfiguration.Host;
                return(true);
            }

            host = default(IBusHostControl);
            return(false);
        }
Example #3
0
        public MassTransitBus(IBusHostControl host, IBusObserver busObservable, IReceiveEndpointConfiguration endpointConfiguration)
        {
            Address          = endpointConfiguration.InputAddress;
            _consumePipe     = endpointConfiguration.ConsumePipe;
            _host            = host;
            _busObservable   = busObservable;
            _receiveEndpoint = endpointConfiguration.ReceiveEndpoint;

            Topology = host.Topology;

            _logContext = LogContext.Current;

            _publishEndpoint = new PublishEndpoint(_receiveEndpoint);
        }
Example #4
0
        public MassTransitBus(IBusHostControl host, IBusObserver busObservable, IReceiveEndpointConfiguration endpointConfiguration)
        {
            Address      = endpointConfiguration.InputAddress;
            _consumePipe = endpointConfiguration.ConsumePipe;
            _consumePipeSpecification = endpointConfiguration.Consume.Specification;
            _host            = host;
            _busObservable   = busObservable;
            _receiveEndpoint = endpointConfiguration.ReceiveEndpoint;

            Topology = host.Topology;

            _logContext = LogContext.Current;

            _publishEndpoint = new Lazy <IPublishEndpoint>(() => _receiveEndpoint.CreatePublishEndpoint(Address));
        }
        public InMemoryBusBuilder(IReceiveTransportProvider receiveTransportProvider, ISendTransportProvider sendTransportProvider, IBusHostControl[] hosts,
            IConsumePipeFactory consumePipeFactory, ISendPipeFactory sendPipeFactory, IPublishPipeFactory publishPipeFactory)
            : base(consumePipeFactory, sendPipeFactory, publishPipeFactory, hosts)
        {
            if (receiveTransportProvider == null)
                throw new ArgumentNullException(nameof(receiveTransportProvider));
            if (sendTransportProvider == null)
                throw new ArgumentNullException(nameof(sendTransportProvider));

            _busQueueName = GenerateBusQueueName();
            _inputAddress = new Uri($"loopback://localhost/{_busQueueName}");

            ReceiveTransportProvider = receiveTransportProvider;
            _sendTransportProvider = sendTransportProvider;
        }
Example #6
0
 public StartHostHandle(IBusHostControl host, HostReceiveEndpointHandle[] handles, params IAgent[] readyAgents)
 {
     _host        = host;
     _handles     = handles;
     _readyAgents = readyAgents;
 }