dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting Inter


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting InternalRemotingServices.cs, 1.2, 1.3 RemotingException.cs, 1.6, 1.7
Date: Tue, 05 Aug 2003 22:07:56 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting
In directory subversions:/tmp/cvs-serv27592/runtime/System/Runtime/Remoting

Modified Files:
        InternalRemotingServices.cs RemotingException.cs 
Log Message:


Outstanding TODO's with the SOAP-related routines in runtime.


Index: InternalRemotingServices.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/InternalRemotingServices.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** InternalRemotingServices.cs 23 Apr 2003 05:39:49 -0000      1.2
--- InternalRemotingServices.cs 6 Aug 2003 02:07:53 -0000       1.3
***************
*** 23,29 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Diagnostics;
  using System.Runtime.Remoting.Messaging;
  using System.Runtime.Remoting.Metadata;
--- 23,31 ----
  {
  
! #if CONFIG_SERIALIZATION
  
+ using System.Collections;
  using System.Diagnostics;
+ using System.Reflection;
  using System.Runtime.Remoting.Messaging;
  using System.Runtime.Remoting.Metadata;
***************
*** 31,34 ****
--- 33,39 ----
  public class InternalRemotingServices
  {
+       // Internal state.
+       private static Hashtable attributeHash;
+ 
        // Output debug information.  Not used in this implementation.
        [Conditional("_LOGGING")]
***************
*** 47,59 ****
  
        // Get the cached SOAP attribute data for an object.
-       // Not used in this implementation.
        public static SoapAttribute GetCachedSoapAttribute(Object 
reflectionObject)
                        {
!                               return null;
                        }
  
  }; // class InternalRemotingServices
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting
--- 52,160 ----
  
        // Get the cached SOAP attribute data for an object.
        public static SoapAttribute GetCachedSoapAttribute(Object 
reflectionObject)
                        {
!                               // Validate the paramter to ensure that it is a
!                               // legitimate reflection object.
!                               if(reflectionObject == null)
!                               {
!                                       return null;
!                               }
!                               else if(!(reflectionObject is MemberInfo) &&
!                                               !(reflectionObject is 
ParameterInfo))
!                               {
!                                       return null;
!                               }
!                               lock(typeof(InternalRemotingServices))
!                               {
!                                       Object attr;
!                                       Object[] attrs;
! 
!                                       // Look for a cached value from last 
time.
!                                       if(attributeHash == null)
!                                       {
!                                               attributeHash = new Hashtable();
!                                       }
!                                       else if((attr = 
attributeHash[reflectionObject]) != null)
!                                       {
!                                               return (attr as SoapAttribute);
!                                       }
! 
!                                       // Get the attribute information from 
the type.
!                                       if(reflectionObject is Type)
!                                       {
!                                               attrs = 
((Type)reflectionObject).GetCustomAttributes
!                                                       
(typeof(SoapTypeAttribute), true);
!                                               if(attrs == null || 
attrs.Length < 1)
!                                               {
!                                                       attr = new 
SoapTypeAttribute();
!                                               }
!                                               else
!                                               {
!                                                       attr = attrs[0];
!                                               }
!                                       }
!                                       else if(reflectionObject is MethodBase)
!                                       {
!                                               attrs = 
((MethodBase)reflectionObject)
!                                                       .GetCustomAttributes
!                                                               
(typeof(SoapMethodAttribute), true);
!                                               if(attrs == null || 
attrs.Length < 1)
!                                               {
!                                                       attr = new 
SoapMethodAttribute();
!                                               }
!                                               else
!                                               {
!                                                       attr = attrs[0];
!                                               }
!                                       }
!                                       else if(reflectionObject is FieldInfo)
!                                       {
!                                               attrs = 
((FieldInfo)reflectionObject)
!                                                       .GetCustomAttributes
!                                                               
(typeof(SoapFieldAttribute), true);
!                                               if(attrs == null || 
attrs.Length < 1)
!                                               {
!                                                       attr = new 
SoapFieldAttribute();
!                                               }
!                                               else
!                                               {
!                                                       attr = attrs[0];
!                                               }
!                                       }
!                                       else if(reflectionObject is 
ParameterInfo)
!                                       {
!                                               attrs = 
((ParameterInfo)reflectionObject)
!                                                       .GetCustomAttributes
!                                                               
(typeof(SoapParameterAttribute), true);
!                                               if(attrs == null || 
attrs.Length < 1)
!                                               {
!                                                       attr = new 
SoapParameterAttribute();
!                                               }
!                                               else
!                                               {
!                                                       attr = attrs[0];
!                                               }
!                                       }
!                                       else
!                                       {
!                                               attrs = 
((MemberInfo)reflectionObject)
!                                                       
.GetCustomAttributes(typeof(SoapAttribute), true);
!                                               if(attrs == null || 
attrs.Length < 1)
!                                               {
!                                                       attr = new 
SoapAttribute();
!                                               }
!                                               else
!                                               {
!                                                       attr = attrs[0];
!                                               }
!                                       }
!                                       
((SoapAttribute)attr).SetReflectInfo(reflectionObject);
!                                       return (SoapAttribute)attr;
!                               }
                        }
  
  }; // class InternalRemotingServices
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting

Index: RemotingException.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/RemotingException.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** RemotingException.cs        26 May 2003 04:41:21 -0000      1.6
--- RemotingException.cs        6 Aug 2003 02:07:53 -0000       1.7
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System;
***************
*** 65,69 ****
  }; // class RemotingException
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting
--- 65,69 ----
  }; // class RemotingException
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting





reply via email to

[Prev in Thread] Current Thread [Next in Thread]