public void Invoke(Action <TChannel> serviceInvocation) { ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName); TChannel channel = channelFactory.CreateChannel(); Invoke(serviceInvocation, channel); }
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 ServiceProxy(string endpointConfigName) : base(typeof(TChannel)) { ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(endpointConfigName); this.innerChannel = (ICommunicationObject)channelFactory.CreateChannel(); this.Channel = (TChannel)this.GetTransparentProxy(); }