Beispiel #1
0
        async Task <CachedSendEndpoint <TKey> > GetSendEndpointFromFactory(TKey address, SendEndpointFactory <TKey> factory)
        {
            var sendEndpoint = await factory(address).ConfigureAwait(false);

            return(new CachedSendEndpoint <TKey>(address, sendEndpoint));
        }
Beispiel #2
0
        async Task <CachedSendEndpoint <Uri> > GetSendEndpointFromFactory(Uri address, SendEndpointFactory factory)
        {
            if (_log.IsDebugEnabled)
            {
                _log.DebugFormat("GetSendEndpoint (factory): {0}", address);
            }

            var sendEndpoint = await factory(address).ConfigureAwait(false);

            return(new CachedSendEndpoint <Uri>(address, sendEndpoint));
        }
Beispiel #3
0
        public async Task <ISendEndpoint> GetSendEndpoint(TKey key, SendEndpointFactory <TKey> factory)
        {
            CachedSendEndpoint <TKey> sendEndpoint = await _index.Get(key, x => GetSendEndpointFromFactory(x, factory)).ConfigureAwait(false);

            return(sendEndpoint);
        }
Beispiel #4
0
        public async Task <ISendEndpoint> GetSendEndpoint(Uri address, SendEndpointFactory factory)
        {
            CachedSendEndpoint <Uri> sendEndpoint = await _index.Get(address, x => GetSendEndpointFromFactory(x, factory)).ConfigureAwait(false);

            return(sendEndpoint);
        }