Merge pull request #1404 from woodsb02/mono-route
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / InternalRemotingServices.cs
index 37746580a49dc89a41d1cb443da437e7bf5b87c5..5ee13c90c62d6385d7fa36beac29c19ad2087438 100644 (file)
@@ -39,9 +39,10 @@ using System.Runtime.Remoting.Messaging;
 
 namespace System.Runtime.Remoting
 {
+       [System.Runtime.InteropServices.ComVisible (true)]
        public class InternalRemotingServices 
        {
-               static Hashtable _soapAttributes;
+               static Hashtable _soapAttributes = new Hashtable ();
                
                public InternalRemotingServices ()
                {
@@ -55,18 +56,8 @@ namespace System.Runtime.Remoting
                }
                
                public static SoapAttribute GetCachedSoapAttribute (object reflectionObject)
-               {
-                       if (_soapAttributes == null)
-                       {
-                               lock (typeof(InternalRemotingServices))
-                               {
-                                       if (_soapAttributes == null)
-                                               _soapAttributes = new Hashtable ();
-                               }
-                       }
-                       
-                       lock (_soapAttributes.SyncRoot)
-                       {
+               {                       
+                       lock (_soapAttributes.SyncRoot) {
                                SoapAttribute att = _soapAttributes [reflectionObject] as SoapAttribute;
                                if (att != null) return att;