diff options
Diffstat (limited to 'linker/Tests/Mono.Linker.Tests.Cases/LinkXml/UnusedEventPreservedByLinkXmlIsKept.cs')
-rw-r--r-- | linker/Tests/Mono.Linker.Tests.Cases/LinkXml/UnusedEventPreservedByLinkXmlIsKept.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases/LinkXml/UnusedEventPreservedByLinkXmlIsKept.cs b/linker/Tests/Mono.Linker.Tests.Cases/LinkXml/UnusedEventPreservedByLinkXmlIsKept.cs new file mode 100644 index 000000000..c17eedfb6 --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases/LinkXml/UnusedEventPreservedByLinkXmlIsKept.cs @@ -0,0 +1,23 @@ +using System; + +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.LinkXml { + class UnusedEventPreservedByLinkXmlIsKept { + public static void Main () + { + } + + [Kept] + class Unused { + [Kept] + [KeptBackingField] + public event EventHandler<EventArgs> Preserved; + + [Kept] + public event EventHandler<EventArgs> Preserved1 { [Kept] add { } [Kept] remove { } } + + public event EventHandler<EventArgs> NotPreserved; + } + } +}
\ No newline at end of file |