blob: 46cb2f1f38f5629647b45f21349e3440b27c0542 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System.Reflection;
using System.Timers;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed {
[Reference ("System.dll")]
[SetupLinkerCoreAction ("link")]
[SetupLinkerArgument ("--used-attrs-only", "true")]
[KeptAttributeInAssembly ("mscorlib.dll", typeof (AssemblyDescriptionAttribute))]
[KeptAttributeInAssembly ("System.dll", typeof (AssemblyDescriptionAttribute))]
[SkipPeVerify]
public class CoreLibraryUsedAssemblyAttributesAreKept {
public static void Main ()
{
// Use something from System so that the entire reference isn't linked away
var system = new Timer ();
// use one of the attribute types so that it is marked
var tmp = typeof (AssemblyDescriptionAttribute).ToString ();
}
}
}
|