X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Reflection.Emit%2FSignatureToken.cs;h=59592c27ff7bfe86894a83a9c2fe323c95a5cb0d;hb=b55f4ec257741ce00eaf78029ea8c60a7a61f085;hp=4d734d3754cfd262954bdccd1ed3e7f2f1a70e65;hpb=0abc2e6270020edc4a5b4c66f93b4ae582815f20;p=mono.git diff --git a/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs b/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs index 4d734d3754c..59592c27ff7 100644 --- a/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs +++ b/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs @@ -25,6 +25,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; namespace System.Reflection.Emit { @@ -32,7 +33,11 @@ namespace System.Reflection.Emit { /// /// Represents the Token returned by the metadata to represent a Signature. /// +#if NET_2_0 + [ComVisible (true)] +#else [Serializable] +#endif public struct SignatureToken { internal int tokValue; @@ -51,8 +56,6 @@ namespace System.Reflection.Emit { tokValue = val; } - - /// /// public override bool Equals (object obj) @@ -67,6 +70,22 @@ namespace System.Reflection.Emit { return res; } +#if NET_2_0 + public bool Equals (SignatureToken obj) + { + return (this.tokValue == obj.tokValue); + } + + public static bool operator == (SignatureToken a, SignatureToken b) + { + return Equals (a, b); + } + + public static bool operator != (SignatureToken a, SignatureToken b) + { + return !Equals (a, b); + } +#endif /// /// Tests whether the given object is an instance of