Esempio n. 1
0
        public TResult Invoke <TResult>(Func <TChannel, TResult> serviceInvocation)
        {
            Guard.ArgumentNotNull(serviceInvocation, "serviceInvocation");
            ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName);
            TChannel channel = channelFactory.CreateChannel();

            return(Invoke(serviceInvocation, channel));
        }
Esempio n. 2
0
        public void Invoke(Action <TChannel> serviceInvocation)
        {
            Guard.ArgumentNotNull(serviceInvocation, "serviceInvocation");
            ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName);
            TChannel channel = channelFactory.CreateChannel();

            Invoke(serviceInvocation, channel);
        }