Warnings cleanup
[mcs.git] / tests / test-224.cs
blobb13f231020a2da5ee6f2abdbcfdef5ebb0816d04
1 // <file>
2 // <copyright see="prj:///doc/copyright.txt"/>
3 // <license see="prj:///doc/license.txt"/>
4 // <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
5 // <version value="$version"/>
6 // </file>
8 using System;
9 using System.Reflection;
11 /// <summary>
12 /// Indicates that field should be treated as a xml attribute for the codon or condition.
13 /// The field is treated as a array, separated by ',' example :
14 /// fileextensions = ".cpp,.cc,.C"
15 /// </summary>
16 [AttributeUsage(AttributeTargets.Field, Inherited=true)]
17 public class XmlMemberArrayAttribute : Attribute
19 char[] separator = new char[] { ',' };
20 string name;
21 bool isRequired;
23 /// <summary>
24 /// Constructs a new instance.
25 /// </summary>
26 public XmlMemberArrayAttribute(string name)
28 this.name = name;
29 isRequired = false;
32 public char[] Separator {
33 get {
34 return separator;
36 set {
37 separator = value;
41 /// <summary>
42 /// The name of the attribute.
43 /// </summary>
44 public string Name {
45 get {
46 return name;
48 set {
49 name = value;
53 /// <summary>
54 /// returns <code>true</code> if this attribute is required.
55 /// </summary>
56 public bool IsRequired {
57 get {
58 return isRequired;
60 set {
61 isRequired = value;
66 public class t
69 [XmlMemberArrayAttribute("shortcut", Separator=new char[] { '|'})]
70 string[] shortcut;
72 public static void Main () { }