public AzureServiceBusSender(AzureServiceBusEndpoint endpoint, AzureServiceBusTransport transport, ITransportLogger logger,
                              CancellationToken cancellation)
 {
     _protocol     = endpoint.Protocol;
     _endpoint     = endpoint;
     _transport    = transport;
     _logger       = logger;
     _cancellation = cancellation;
     Destination   = endpoint.Uri;
 }
        public AzureServiceBusListener(AzureServiceBusEndpoint endpoint, AzureServiceBusTransport transport,
                                       ITransportLogger logger, CancellationToken cancellation)
        {
            _endpoint     = endpoint;
            _transport    = transport;
            _logger       = logger;
            _cancellation = cancellation;


            _protocol = endpoint.Protocol;
            Address   = endpoint.Uri;
        }
示例#3
0
        public AzureServiceBusSender(AzureServiceBusEndpoint endpoint, AzureServiceBusTransport transport)
        {
            _protocol  = endpoint.Protocol;
            _endpoint  = endpoint;
            _transport = transport;

            // The variance here should be in constructing the sending & buffer blocks
            if (_endpoint.TopicName.IsEmpty())
            {
                _sender = _transport.TokenProvider != null
                    ? new MessageSender(_transport.ConnectionString, _endpoint.QueueName, _transport.TokenProvider,
                                        _transport.TransportType, _transport.RetryPolicy)
                    : new MessageSender(_transport.ConnectionString, _endpoint.QueueName, _transport.RetryPolicy);
            }
            else
            {
                _sender = _transport.TokenProvider != null
                    ? new TopicClient(_transport.ConnectionString, _endpoint.TopicName, _transport.TokenProvider,
                                      _transport.TransportType, _transport.RetryPolicy)
                    : new TopicClient(_transport.ConnectionString, _endpoint.TopicName,
                                      _transport.RetryPolicy);
            }
        }