diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-08-07 10:21:50 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-08-07 10:21:50 +0400 |
commit | c65767432f5b5bb206196ee013463bec2b74a8ba (patch) | |
tree | e8c5bf9488e2ad8ab71349050d9f4a358c98d83d | |
parent | 1ac99f5eaa4da11ffeeabff80b833f2568f20a9c (diff) |
2009-08-07 Atsushi Enomoto <atsushi@ximian.com>
* ClientRuntimeChannel.cs : factory was not fully optional. Add
contextChannel argument to make room for duplex callback channel.
svn path=/trunk/mcs/; revision=139545
-rwxr-xr-x | mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog index 7c38915541c..245d09cc2ba 100755 --- a/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog +++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog @@ -1,5 +1,10 @@ 2009-08-07 Atsushi Enomoto <atsushi@ximian.com> + * ClientRuntimeChannel.cs : factory was not fully optional. Add + contextChannel argument to make room for duplex callback channel. + +2009-08-07 Atsushi Enomoto <atsushi@ximian.com> + * ClientProxyGenerator.cs : split client-specific code generation from those common to service callback generation. * ServiceProxyGenerator.cs : new file, uses common basis above. diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs index 726098c60bc..9bd49501185 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs @@ -105,11 +105,11 @@ namespace System.ServiceModel public ClientRuntimeChannel (ServiceEndpoint endpoint, ChannelFactory channelFactory, EndpointAddress remoteAddress, Uri via) - : this (endpoint.CreateRuntime (), endpoint.Contract, channelFactory.DefaultOpenTimeout, channelFactory.DefaultCloseTimeout, channelFactory.OpenedChannelFactory, endpoint.Binding.MessageVersion, remoteAddress, via) + : this (endpoint.CreateRuntime (), endpoint.Contract, channelFactory.DefaultOpenTimeout, channelFactory.DefaultCloseTimeout, null, channelFactory.OpenedChannelFactory, endpoint.Binding.MessageVersion, remoteAddress, via) { } - public ClientRuntimeChannel (ClientRuntime runtime, ContractDescription contract, TimeSpan openTimeout, TimeSpan closeTimeout, IChannelFactory factory, MessageVersion messageVersion, EndpointAddress remoteAddress, Uri via) + public ClientRuntimeChannel (ClientRuntime runtime, ContractDescription contract, TimeSpan openTimeout, TimeSpan closeTimeout, IChannel contextChannel, IChannelFactory factory, MessageVersion messageVersion, EndpointAddress remoteAddress, Uri via) { this.runtime = runtime; this.remote_address = remoteAddress; @@ -126,11 +126,13 @@ namespace System.ServiceModel AllowInitializationUI = true; OperationTimeout = TimeSpan.FromMinutes (1); - - var method = factory.GetType ().GetMethod ("CreateChannel", new Type [] {typeof (EndpointAddress), typeof (Uri)}); - channel = (IChannel) method.Invoke (factory, new object [] {remote_address, Via}); - - this.factory = factory; + if (contextChannel != null) + channel = contextChannel; + else { + var method = factory.GetType ().GetMethod ("CreateChannel", new Type [] {typeof (EndpointAddress), typeof (Uri)}); + channel = (IChannel) method.Invoke (factory, new object [] {remote_address, Via}); + this.factory = factory; + } } public ClientRuntime Runtime { |