2 // dynamic type attribute decoration
15 public const dynamic c
= default (dynamic);
17 public dynamic Prop { set; get; }
18 public dynamic Prop2 { set {}
}
20 public dynamic this [dynamic d
] { set {}
get { return 1; }
}
22 public dynamic Method (dynamic d
)
28 delegate dynamic Del (dynamic d
);
32 public static int Main ()
35 Type ca
= typeof (System
.Runtime
.CompilerServices
.DynamicAttribute
);
37 if (t
.GetMember ("a")[0].GetCustomAttributes (ca
, false).Length
!= 1)
40 // TODO: Why is it needed
41 //if (t.GetMember ("a2")[0].GetCustomAttributes (ca, false).Length != 1)
44 if (t
.GetMember ("c")[0].GetCustomAttributes (ca
, false).Length
!= 1)
47 if (t
.GetMember ("Prop")[0].GetCustomAttributes (ca
, false).Length
!= 1)
50 if (t
.GetMember ("get_Prop")[0].GetCustomAttributes (ca
, false).Length
!= 0)
53 if (t
.GetMethod ("get_Prop").ReturnParameter
.GetCustomAttributes (ca
, false).Length
!= 1)
56 if (t
.GetMember ("set_Prop")[0].GetCustomAttributes (ca
, false).Length
!= 0)
59 if (t
.GetMethod ("set_Prop").ReturnParameter
.GetCustomAttributes (ca
, false).Length
!= 0)
62 if (t
.GetMethod ("set_Prop").GetParameters()[0].GetCustomAttributes (ca
, false).Length
!= 1)
65 if (t
.GetMember ("Prop2")[0].GetCustomAttributes (ca
, false).Length
!= 1)
68 if (t
.GetMember ("set_Prop2")[0].GetCustomAttributes (ca
, false).Length
!= 0)
71 if (t
.GetMember ("Item")[0].GetCustomAttributes (ca
, false).Length
!= 1)
74 if (t
.GetMethod ("get_Item").ReturnParameter
.GetCustomAttributes (ca
, false).Length
!= 1)
77 if (t
.GetMethod ("get_Item").GetParameters()[0].GetCustomAttributes (ca
, false).Length
!= 1)
80 if (t
.GetMethod ("set_Item").ReturnParameter
.GetCustomAttributes (ca
, false).Length
!= 0)
83 if (t
.GetMethod ("set_Item").GetParameters()[0].GetCustomAttributes (ca
, false).Length
!= 1)
86 if (t
.GetMethod ("set_Item").GetParameters()[1].GetCustomAttributes (ca
, false).Length
!= 1)
89 if (t
.GetMember ("Method")[0].GetCustomAttributes (ca
, false).Length
!= 0)
92 if (t
.GetMethod ("Method").GetParameters()[0].GetCustomAttributes (ca
, false).Length
!= 1)
95 if (t
.GetConstructors ()[0].GetParameters()[0].GetCustomAttributes (ca
, false).Length
!= 1)
98 if (t
.GetConstructors ()[0].GetCustomAttributes (ca
, false).Length
!= 0)
104 if (t
.GetMember ("Invoke")[0].GetCustomAttributes (ca
, false).Length
!= 0)
107 if (t
.GetMethod ("Invoke").GetParameters()[0].GetCustomAttributes (ca
, false).Length
!= 1)
110 if (t
.GetMethod ("Invoke").ReturnParameter
.GetCustomAttributes (ca
, false).Length
!= 1)
113 Console
.WriteLine ("ok");