diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/CustomEventSource.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/CustomEventSource.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/CustomEventSource.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/CustomEventSource.cs new file mode 100644 index 000000000..8286f22c5 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/CustomEventSource.cs @@ -0,0 +1,47 @@ +using System; +using System.Diagnostics.Tracing; +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW { + public class CustomEventSource { + public static void Main () + { + var b = MyCompanyEventSource.Log.IsEnabled (); + } + } + + [Kept] + [KeptBaseType (typeof (EventSource))] + [KeptAttributeAttribute (typeof (EventSourceAttribute))] + [KeptMember (".ctor()")] + [KeptMember (".cctor()")] + + [EventSource (Name = "MyCompany")] + class MyCompanyEventSource : EventSource + { + [Kept] + public class Keywords + { + [Kept] + public const EventKeywords Page = (EventKeywords)1; + + public int Unused; + } + + [Kept] + public class Tasks + { + [Kept] + public const EventTask Page = (EventTask)1; + + public int Unused; + } + + class NotMatching + { + } + + [Kept] + public static MyCompanyEventSource Log = new MyCompanyEventSource (); + } +} |