async Task <CachedSendEndpoint <TKey> > GetSendEndpointFromFactory(TKey address, SendEndpointFactory <TKey> factory) { var sendEndpoint = await factory(address).ConfigureAwait(false); return(new CachedSendEndpoint <TKey>(address, sendEndpoint)); }
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)); }
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); }
public async Task <ISendEndpoint> GetSendEndpoint(Uri address, SendEndpointFactory factory) { CachedSendEndpoint <Uri> sendEndpoint = await _index.Get(address, x => GetSendEndpointFromFactory(x, factory)).ConfigureAwait(false); return(sendEndpoint); }