summaryrefslogtreecommitdiff
path: root/ICSharpCode.Decompiler/Tests/CustomAttributes.code.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ICSharpCode.Decompiler/Tests/CustomAttributes.code.cs')
-rw-r--r--ICSharpCode.Decompiler/Tests/CustomAttributes.code.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/ICSharpCode.Decompiler/Tests/CustomAttributes.code.cs b/ICSharpCode.Decompiler/Tests/CustomAttributes.code.cs
new file mode 100644
index 00000000..4130b0b0
--- /dev/null
+++ b/ICSharpCode.Decompiler/Tests/CustomAttributes.code.cs
@@ -0,0 +1,41 @@
+using System;
+namespace aa
+{
+ public static class CustomAtributes
+ {
+ [Flags]
+ public enum EnumWithFlag
+ {
+ All = 15,
+ None = 0,
+ Item1 = 1,
+ Item2 = 2,
+ Item3 = 4,
+ Item4 = 8
+ }
+ [AttributeUsage(AttributeTargets.All)]
+ public class MyAttribute : Attribute
+ {
+ public MyAttribute(CustomAtributes.EnumWithFlag en)
+ {
+ }
+ }
+ [CustomAtributes.MyAttribute(CustomAtributes.EnumWithFlag.Item1 | CustomAtributes.EnumWithFlag.Item2)]
+ private static int field;
+ [CustomAtributes.MyAttribute(CustomAtributes.EnumWithFlag.All)]
+ public static string Property
+ {
+ get
+ {
+ return "aa";
+ }
+ }
+ [Obsolete("some message")]
+ public static void ObsoletedMethod()
+ {
+ Console.WriteLine("{0} $$$ {1}", AttributeTargets.Interface, AttributeTargets.Property | AttributeTargets.Field);
+ AttributeTargets attributeTargets = AttributeTargets.Property | AttributeTargets.Field;
+ Console.WriteLine("{0} $$$ {1}", AttributeTargets.Interface, attributeTargets);
+ }
+ }
+}