2007-05-11 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mcs / class / corlib / System.Reflection / CustomAttributeNamedArgument.cs
index 7d622520fbbd515c47269783ecab77dbd640bbf3..c17fe099fb56c33baffa5909599a16a801e73bd7 100644 (file)
@@ -3,6 +3,7 @@
 //
 // Author:
 //   Zoltan Varga (vargaz@gmail.com)
+//   Carlos Alberto Cortez (calberto.cortez@gmail.com)
 //
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 #if NET_2_0
 
 using System;
+using System.Runtime.InteropServices;
 
 namespace System.Reflection {
 
+       [ComVisible (true)]
+       [Serializable]
        public struct CustomAttributeNamedArgument {
+               CustomAttributeTypedArgument typedArgument;
+               MemberInfo memberInfo;
+
+               internal CustomAttributeNamedArgument (MemberInfo memberInfo, object typedArgument)
+               {
+                       this.memberInfo = memberInfo;
+                       this.typedArgument = (CustomAttributeTypedArgument) typedArgument;
+               }
 
-               [MonoTODO]
                public MemberInfo MemberInfo {
                        get {
-                               throw new NotImplementedException ();
+                               return memberInfo;
                        }
                }
 
-               [MonoTODO]
                public CustomAttributeTypedArgument TypedValue {
                        get {
-                               throw new NotImplementedException ();
+                               return typedArgument;
                        }
                }
+
+               public override string ToString ()
+               {
+                       return memberInfo.Name + " = " + typedArgument.ToString ();
+               }
        }
 
 }