2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.ComponentModel.DataAnnotations;
8 namespace MonoTests.Common
10 [MetadataType (typeof (FooMetaDataType))]
11 class FooWithMetadataType
13 [DefaultValue ("Value")]
14 [Description ("Description")]
15 public string Column1 { get; set; }
16 public string Column2 { get; set; }
18 [DisplayName ("Column three")]
19 public string Column3 { get; set; }
20 public string Column4 { get; set; }
23 public bool Column5 { get; set; }
25 // This will cause the column to be treated the way nullable database
26 // columns are - that is, its associated MetaColumn.IsRequired will
27 // return false (this is thanks to our test DynamicDataContainerColumnProvider
28 public bool? Column6 { get; set; }
29 public string Column7 { get; set; }
32 [DisplayColumn ("Column2")]
36 ApplyFormatInEditMode = true,
37 ConvertEmptyStringToNull=true,
38 DataFormatString="Item: {0}"
40 public string Column1;
42 [DefaultValue ("Value")]
43 [DataType (DataType.Time)]
44 public string Column2;
47 [DataType (DataType.Currency)]
48 [Description ("Description")]
51 [DisplayName ("Column four")]
52 public string Column4 { get; set; }
55 public string Column7;