From a049865bb3877cb090434e0c90a71ea1deb5b37a Mon Sep 17 00:00:00 2001 From: Ben Maurer Date: Sun, 5 Sep 2004 16:26:09 +0000 Subject: [PATCH] 2004-09-05 Ben Maurer * RemotingServices.cs (IsOneWay): use IsDefined rather than svn path=/trunk/mcs/; revision=33371 --- mcs/class/corlib/System.Runtime.Remoting/ChangeLog | 5 +++++ mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog index 87ee0da7ffe..ba834aa6e0a 100755 --- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog +++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog @@ -1,3 +1,8 @@ +2004-09-05 Ben Maurer + + * RemotingServices.cs (IsOneWay): use IsDefined rather than + GetCustomAttributes. It is much faster. + 2004-07-22 Lluis Sanchez Gual * ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs index 634792c9417..3aed6e8df5d 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs @@ -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) -- 2.11.4.GIT