Exemplo n.º 1
0
        public void Invoke(Action <TChannel> serviceInvocation)
        {
            ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName);
            TChannel channel = channelFactory.CreateChannel();

            Invoke(serviceInvocation, channel);
        }
Exemplo n.º 2
0
        public TResult Invoke <TResult>(Func <TChannel, TResult> serviceInvocation)
        {
            ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(this.EndpointName);
            TChannel channel = channelFactory.CreateChannel();

            return(Invoke(serviceInvocation, channel));
        }
Exemplo n.º 3
0
        public ServiceProxy(string endpointConfigName)
            : base(typeof(TChannel))
        {
            ChannelFactory <TChannel> channelFactory = ChannelFactories.GetFactory <TChannel>(endpointConfigName);

            this.innerChannel = (ICommunicationObject)channelFactory.CreateChannel();
            this.Channel      = (TChannel)this.GetTransparentProxy();
        }