2004-09-05 Ben Maurer <bmaurer@users.sourceforge.net>
authorBen Maurer <benm@mono-cvs.ximian.com>
Sun, 5 Sep 2004 16:26:09 +0000 (16:26 -0000)
committerBen Maurer <benm@mono-cvs.ximian.com>
Sun, 5 Sep 2004 16:26:09 +0000 (16:26 -0000)
* RemotingServices.cs (IsOneWay): use IsDefined rather than

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

mcs/class/corlib/System.Runtime.Remoting/ChangeLog
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs

index 87ee0da7ffe09c7c22dfae8ec00a834cdfb8bb0b..ba834aa6e0af1da2803938074b79534b511d30ce 100755 (executable)
@@ -1,3 +1,8 @@
+2004-09-05 Ben Maurer  <bmaurer@users.sourceforge.net>
+
+       * RemotingServices.cs (IsOneWay): use IsDefined rather than
+       GetCustomAttributes. It is much faster.
+
 2004-07-22  Lluis Sanchez Gual  <lluis@novell.com>
 
        * ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class
index 634792c9417b9165c57f5215bbf84a0de52db7d6..3aed6e8df5dda1700f77a41f98a8e76dc9e1b762 100644 (file)
@@ -406,9 +406,7 @@ namespace System.Runtime.Remoting
 
                public static bool IsOneWay(MethodBase method)
                {
-                       // TODO: use internal call for better performance
-                       object[] atts = method.GetCustomAttributes (typeof (OneWayAttribute), false);
-                       return atts.Length > 0;
+                       return method.IsDefined (typeof (OneWayAttribute), false);
                }
 
                internal static bool IsAsyncMessage(IMessage msg)