2010-03-17 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 17 Mar 2010 11:09:11 +0000 (11:09 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 17 Mar 2010 11:09:11 +0000 (11:09 -0000)
* ConfigUtil.cs, StandardBindingCollectionElement.cs,
  MexHttpsBindingCollectionElement.cs,
  MexHttpBindingCollectionElement.cs : use GetDefault() in
  BindingCollectionElement to create a Binding, instead of activator
  immediately. And for mex bindings, use MetadataExchangeBindings.

svn path=/trunk/mcs/; revision=153723

mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MexHttpBindingCollectionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MexHttpsBindingCollectionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardBindingCollectionElement.cs

index 3822f5351faf606306336f5c50c095d534aa92c7..0b743f33eab0ea1960be5ff7982098e0336b5b5a 100755 (executable)
@@ -1,3 +1,11 @@
+2010-03-17  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ConfigUtil.cs, StandardBindingCollectionElement.cs,
+         MexHttpsBindingCollectionElement.cs,
+         MexHttpBindingCollectionElement.cs : use GetDefault() in
+         BindingCollectionElement to create a Binding, instead of activator
+         immediately. And for mex bindings, use MetadataExchangeBindings.
+
 2010-03-16  Atsushi Enomoto  <atsushi@ximian.com>
 
        * TcpTransportElement.cs
index 360fe8cf05f7933eaedc15f3d243cfae24b859c0..ba23d85f08e97240b473a31321dfb6f982297d74 100644 (file)
@@ -74,7 +74,7 @@ namespace System.ServiceModel.Configuration
                        if (section == null)
                                throw new ArgumentException (String.Format ("binding section for {0} was not found.", binding));
 
-                       Binding b = (Binding) Activator.CreateInstance (section.BindingType, new object [0]);
+                       Binding b = section.GetDefault ();
 
                        foreach (IBindingConfigurationElement el in section.ConfiguredBindings)
                                if (el.Name == bindingConfiguration)
index d9d252e28291590fa291c0e60a51538f86b8ae58..c97a174c2b8347a3f19621f29029bb605c9910b2 100644 (file)
@@ -54,7 +54,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public partial class MexHttpBindingCollectionElement
                 : MexBindingBindingCollectionElement<WSHttpBinding, MexHttpBindingElement>
        {
@@ -70,10 +69,10 @@ namespace System.ServiceModel.Configuration
                {
                }
 
-
-               // Properties
-
-
+               protected internal override Binding GetDefault ()
+               {
+                       return MetadataExchangeBindings.CreateMexHttpBinding ();
+               }
        }
 
 }
index 09eaf398e30b2934e5636c77c4e579852c3594b2..d7288f40f11937f788600e0bd771c80c7c73443c 100644 (file)
@@ -54,7 +54,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public partial class MexHttpsBindingCollectionElement
                 : MexBindingBindingCollectionElement<WSHttpBinding, MexHttpsBindingElement>
        {
@@ -70,10 +69,10 @@ namespace System.ServiceModel.Configuration
                {
                }
 
-
-               // Properties
-
-
+               protected internal override Binding GetDefault ()
+               {
+                       return MetadataExchangeBindings.CreateMexHttpsBinding ();
+               }
        }
 
 }
index fd75d55dc7d679842b41541dce781c6294bb4d48..5e432e1616b5f530a8852339b72a7c49934f6734 100644 (file)
@@ -99,8 +99,9 @@ namespace System.ServiceModel.Configuration
                        throw new NotImplementedException ();
                }
 
-               protected internal override Binding GetDefault () {
-                       throw new NotImplementedException ();
+               protected internal override Binding GetDefault ()
+               {
+                       return (Binding) Activator.CreateInstance (BindingType, new object [0]);
                }
 
                protected internal override bool TryAdd (string name, Binding binding, System.Configuration.Configuration config) {