+
+ public override string ToString ()
+ {
+ string val = value != null ? value.ToString () : String.Empty;
+ if (argumentType == typeof (string))
+ return "\"" + val + "\"";
+ if (argumentType == typeof (Type))
+ return "typeof (" + val + ")";
+ if (argumentType.IsEnum)
+ return "(" + argumentType.Name + ")" + val;
+
+ return val;
+ }
+
+ public override bool Equals (object obj)
+ {
+ if (!(obj is CustomAttributeTypedArgument))
+ return false;
+ CustomAttributeTypedArgument other = (CustomAttributeTypedArgument) obj;
+ return other.argumentType == argumentType &&
+ value != null ? value.Equals (other.value) : (object) other.value == null;
+ }
+
+ public override int GetHashCode ()
+ {
+ return (argumentType.GetHashCode () << 16) + (value != null ? value.GetHashCode () : 0);
+ }
+
+ public static bool operator == (CustomAttributeTypedArgument left, CustomAttributeTypedArgument right)
+ {
+ return left.Equals (right);
+ }
+
+ public static bool operator != (CustomAttributeTypedArgument left, CustomAttributeTypedArgument right)
+ {
+ return !left.Equals (right);
+ }