2 using CustomAttributes
;
6 // Partial methods w/o attributes.
7 partial void PartialMethodWith_NoAttr_NoDefn(string s
);
8 partial void PartialMethodWith_NoAttr_Decl(string s
);
10 // Partial methods w/o a definition.
11 [AttributeA("ANoDef")]
12 partial void PartialMethodWith_AAttr_NoDefn(string s
);
13 partial void PartialMethodWith_BAttr_NoDefn([AttributeB("BNoDef")]string s
);
15 // Attributes only on declaration.
17 partial void PartialMethodWith_AAttr_Decl(string s
);
18 partial void PartialMethodWith_BAttr_Decl([AttributeB("BDecl")]string s
);
20 // Attributes only on definition.
21 partial void PartialMethodWith_AAttr_Defn(string s
);
22 partial void PartialMethodWith_BAttr_Defn(string s
);
24 // Different Attribute on definition.
25 [AttributeA("WithABAttr")]
26 partial void PartialMethodWith_ABAttr(string s
);
27 partial void PartialMethodWith_BAAttr([AttributeB("WithBAAttr")]string s
);
32 // Partial methods w/o attributes.
33 partial void PartialMethodWith_NoAttr_Decl(string s
) { }
35 // Attributes only on declaration.
36 partial void PartialMethodWith_AAttr_Decl(string s
) { }
37 partial void PartialMethodWith_BAttr_Decl(string s
) { }
39 // Attributes only on definition.
41 partial void PartialMethodWith_AAttr_Defn(string s
) { }
42 partial void PartialMethodWith_BAttr_Defn([AttributeB("BDefn")]string s
)
46 // Different Attribute on definition.
47 [AttributeB("ABAttr")]
48 partial void PartialMethodWith_ABAttr(string s
) { }
49 partial void PartialMethodWith_BAAttr([AttributeA("BAAttr")]string s
) { }
52 namespace CustomAttributes
{
53 [AttributeUsage(AttributeTargets
.All
, AllowMultiple
=true)]
54 public class AttributeA
: Attribute
{
55 public AttributeA(String a
) {}
58 [AttributeUsage(AttributeTargets
.All
, AllowMultiple
=true)]
59 public class AttributeB
: Attribute
{
60 public AttributeB(String a
) {}
66 public static void Main ()