2009-04-17 Geoff Norton <gnorton@novell.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Fri, 17 Apr 2009 17:04:46 +0000 (17:04 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Fri, 17 Apr 2009 17:04:46 +0000 (17:04 -0000)
        * ChannelFactory.cs: Ensure we create and open a factory here,
        avoids a NRE regression in
        System.ServiceModel.ClientRuntimeChannel.SetupRequestChannel ()

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

mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs

index 99c88ac77c6e47ad3fe7102229e09f1c604c8fce..509a30af277c52bfb1d24bc127c4ddd8bc66d164 100755 (executable)
@@ -1,3 +1,9 @@
+2009-04-17  Geoff Norton  <gnorton@novell.com>
+
+       * ChannelFactory.cs: Ensure we create and open a factory here,
+       avoids a NRE regression in
+       System.ServiceModel.ClientRuntimeChannel.SetupRequestChannel ()
+
 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ChannelFactory.cs, ClientRuntimeChannel.cs : implemented
index c2fab23ab37699f13305149e8c04b4a2a4f52abe..88986995295068c03a8a664a570f426c2d87717d 100644 (file)
@@ -43,12 +43,25 @@ namespace System.ServiceModel
                // instance members
 
                ServiceEndpoint service_endpoint;
+               IChannelFactory factory;
 
                protected ChannelFactory ()
                {
                }
 
-               internal IChannelFactory OpenedChannelFactory { get; private set; }
+               internal IChannelFactory OpenedChannelFactory {
+                       get {
+                               if (factory == null) {
+                                       factory = CreateFactory ();
+                                       factory.Open ();
+                               }
+
+                               return factory;
+                       }
+                       private set {
+                               factory = value;
+                       }
+               }
 
                public ServiceEndpoint Endpoint {
                        get { return service_endpoint; }