public TResult Invoke <TResult>(Func <TChannel, TResult> serviceInvocation) { ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName); TChannel channel = channelFactory.CreateChannel(); return(Invoke(serviceInvocation, channel)); }
public void Invoke(Action <TChannel> serviceInvocation) { ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName); TChannel channel = channelFactory.CreateChannel(); Invoke(serviceInvocation, channel); }