diff options
author | Todd Berman <tberman@mono-cvs.ximian.com> | 2004-01-04 02:05:39 +0300 |
---|---|---|
committer | Todd Berman <tberman@mono-cvs.ximian.com> | 2004-01-04 02:05:39 +0300 |
commit | f47a83c90d0acb6e6d846bef1243e7362e61ec3e (patch) | |
tree | bd64b7ce558b99dda522c2038b00f4743ba2df69 /mcs/tests/test-224.cs | |
parent | 1b5ada5730f3f2cf6c6889448dc8145ae05dd22e (diff) |
2004-01-03 Todd Berman <tberman@gentoo.org>
* test-224.cs: new test for #52429
svn path=/trunk/mcs/; revision=21661
Diffstat (limited to 'mcs/tests/test-224.cs')
-rw-r--r-- | mcs/tests/test-224.cs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/mcs/tests/test-224.cs b/mcs/tests/test-224.cs new file mode 100644 index 00000000000..b13f231020a --- /dev/null +++ b/mcs/tests/test-224.cs @@ -0,0 +1,74 @@ +// <file> +// <copyright see="prj:///doc/copyright.txt"/> +// <license see="prj:///doc/license.txt"/> +// <owner name="Mike Krüger" email="mike@icsharpcode.net"/> +// <version value="$version"/> +// </file> + +using System; +using System.Reflection; + + /// <summary> + /// Indicates that field should be treated as a xml attribute for the codon or condition. + /// The field is treated as a array, separated by ',' example : + /// fileextensions = ".cpp,.cc,.C" + /// </summary> + [AttributeUsage(AttributeTargets.Field, Inherited=true)] + public class XmlMemberArrayAttribute : Attribute + { + char[] separator = new char[] { ',' }; + string name; + bool isRequired; + + /// <summary> + /// Constructs a new instance. + /// </summary> + public XmlMemberArrayAttribute(string name) + { + this.name = name; + isRequired = false; + } + + public char[] Separator { + get { + return separator; + } + set { + separator = value; + } + } + + /// <summary> + /// The name of the attribute. + /// </summary> + public string Name { + get { + return name; + } + set { + name = value; + } + } + + /// <summary> + /// returns <code>true</code> if this attribute is required. + /// </summary> + public bool IsRequired { + get { + return isRequired; + } + set { + isRequired = value; + } + } + } + +public class t +{ + + [XmlMemberArrayAttribute("shortcut", Separator=new char[] { '|'})] + string[] shortcut; + + public static void Main () { } + +} |