Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2009-08-06 12:39:05 +0400
committerAtsushi Eno <atsushieno@gmail.com>2009-08-06 12:39:05 +0400
commit9e4d364a6d10ab8c4a5adb103bf8d8098cdf7863 (patch)
treeea1fb679038376b9791717bf180fbc50c61659b7 /mcs/class
parentf74dc00c6eb9eea1517d1c7a875437c12804b25d (diff)
2009-08-06 Atsushi Enomoto <atsushi@ximian.com>
* ClientRuntimeChannel.cs : removing extra deps on ServiceEndpoint. * ClientRuntime.cs : .ctor() just needs contract. Fill some properties. * ServiceEndpoint.cs : follow ClientRuntime change. svn path=/trunk/mcs/; revision=139464
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog5
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs20
-rwxr-xr-xmcs/class/System.ServiceModel/System.ServiceModel/ChangeLog4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs34
6 files changed, 31 insertions, 38 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog
index 48cf9c396cb..5731109d17b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog
@@ -1,3 +1,7 @@
+2009-08-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceEndpoint.cs : follow ClientRuntime change.
+
2009-07-31 Atsushi Enomoto <atsushi@ximian.com>
* ServiceEndpoint.cs : ListenUri defaults to Address.Uri.
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
index fddae747605..12962709216 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
@@ -115,7 +115,7 @@ namespace System.ServiceModel.Description
{
ServiceEndpoint se = this;
- ClientRuntime proxy = new ClientRuntime (se);
+ ClientRuntime proxy = new ClientRuntime (se.Contract);
//proxy.ContractClientType = typeof (TChannel);
foreach (OperationDescription od in se.Contract.Operations)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
index 37b3f44f284..9f93fc43154 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ClientRuntime.cs :
+ .ctor() just needs contract. Fill some properties.
+
2009-08-04 Atsushi Enomoto <atsushi@ximian.com>
* ReplyHandler.cs : there is better way to check IsOneWay.
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
index 6d72d3c90ce..9536fd97337 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
@@ -35,7 +35,6 @@ namespace System.ServiceModel.Dispatcher
{
public sealed class ClientRuntime
{
- Type callback, contract;
SynchronizedCollection<IChannelInitializer> channel_initializers
= new SynchronizedCollection<IChannelInitializer> ();
SynchronizedCollection<IInteractiveChannelInitializer> interactive_channel_initializers
@@ -65,17 +64,15 @@ namespace System.ServiceModel.Dispatcher
#endif
// .ctor() for Clients
- internal ClientRuntime (ServiceEndpoint endpoint)
+ internal ClientRuntime (ContractDescription contract)
{
- contract_name = endpoint.Contract.Name;
- contract_ns = endpoint.Contract.Namespace;
- contract = endpoint.Contract.ContractType;
+ contract_name = contract.Name;
+ contract_ns = contract.Namespace;
+ ContractClientType = contract.ContractType;
+ CallbackClientType = contract.CallbackContractType;
}
- public Type CallbackClientType {
- get { return callback; }
- set { callback = value; }
- }
+ public Type CallbackClientType { get; set; }
public SynchronizedCollection<IChannelInitializer> ChannelInitializers {
get { return channel_initializers; }
@@ -94,10 +91,7 @@ namespace System.ServiceModel.Dispatcher
}
- public Type ContractClientType {
- get { return contract; }
- set { contract = value; }
- }
+ public Type ContractClientType { get; set; }
#if !NET_2_1
public DispatchRuntime CallbackDispatchRuntime {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
index 581bd843785..3366ccccee5 100755
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
@@ -1,5 +1,9 @@
2009-08-06 Atsushi Enomoto <atsushi@ximian.com>
+ * ClientRuntimeChannel.cs : removing extra deps on ServiceEndpoint.
+
+2009-08-06 Atsushi Enomoto <atsushi@ximian.com>
+
* ClientRuntimeChannel.cs : eliminate dependency on ChannelFactory,
which will block using it for callback instances.
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
index 1134eb3da5f..68f664e212d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
@@ -83,7 +83,8 @@ namespace System.ServiceModel
{
ClientRuntime runtime;
EndpointAddress remote_address;
- ServiceEndpoint endpoint;
+ ContractDescription contract;
+ MessageVersion message_version;
IChannelFactory factory;
TimeSpan default_open_timeout, default_close_timeout;
IRequestChannel request_channel;
@@ -104,15 +105,16 @@ namespace System.ServiceModel
#endregion
public ClientRuntimeChannel (ServiceEndpoint endpoint,
- ChannelFactory factory, EndpointAddress remoteAddress, Uri via)
+ ChannelFactory channelFactory, EndpointAddress remoteAddress, Uri via)
{
this.runtime = endpoint.CreateRuntime ();
this.remote_address = remoteAddress ?? endpoint.Address;
runtime.Via = via;
- this.endpoint = endpoint;
- this.factory = factory.OpenedChannelFactory;
- default_open_timeout = factory.DefaultOpenTimeout;
- default_close_timeout = factory.DefaultCloseTimeout;
+ this.contract = endpoint.Contract;
+ this.message_version = endpoint.Binding.MessageVersion;
+ this.factory = channelFactory.OpenedChannelFactory;
+ default_open_timeout = channelFactory.DefaultOpenTimeout;
+ default_close_timeout = channelFactory.DefaultCloseTimeout;
_processDelegate = new ProcessDelegate (Process);
requestDelegate = new RequestDelegate (Request);
sendDelegate = new SendDelegate (Send);
@@ -445,28 +447,12 @@ namespace System.ServiceModel
operation = Runtime.OperationSelector.SelectOperation (method, parameters);
else
operation = operationName;
- OperationDescription od = endpoint.Contract.Operations.Find (operation);
+ OperationDescription od = contract.Operations.Find (operation);
if (od == null)
throw new Exception (String.Format ("OperationDescription for operation '{0}' was not found in its internally-generated contract.", operation));
return od;
}
- BindingParameterCollection CreateBindingParameters ()
- {
- BindingParameterCollection pl =
- new BindingParameterCollection ();
-
- ContractDescription cd = endpoint.Contract;
-#if !NET_2_1
- pl.Add (ChannelProtectionRequirements.CreateFromContract (cd));
-
- foreach (IEndpointBehavior behavior in endpoint.Behaviors)
- behavior.AddBindingParameters (endpoint, pl);
-#endif
-
- return pl;
- }
-
// This handles IDuplexChannel, IOutputChannel, and those for session channels.
void SetupOutputChannel ()
{
@@ -576,7 +562,7 @@ namespace System.ServiceModel
Message CreateRequest (ClientOperation op, object [] parameters)
{
- MessageVersion version = endpoint.Binding.MessageVersion;
+ MessageVersion version = message_version;
if (version == null)
version = MessageVersion.Default;