blob: e2bb06b161a284da25c1e68f738f259f1d8a8ffe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
using Mono.Linker.Tests.Cases.LinkAttributes.Dependencies;
namespace Mono.Linker.Tests.Cases.LinkAttributes
{
[SetupCompileBefore ("attributes.dll", new string[] { "Dependencies/TestRemoveDontRemoveAttributes.cs" },
resources: new object[] { new string[] { "Dependencies/TestRemoveAttribute.xml", "ILLink.LinkAttributes.xml" } }, addAsReference: false)]
[SetupCompileBefore ("library.dll", new string[] { "Dependencies/ReferencedAssemblyWithAttributes.cs" }, references: new string[] { "attributes.dll" })]
[SetupLinkerAction ("copyused", "attributes")] // Ensure that assembly-level attributes are kept
[IgnoreLinkAttributes (false)]
[KeptAttributeInAssembly ("library.dll", "Mono.Linker.Tests.Cases.LinkAttributes.Dependencies.TestDontRemoveAttribute")]
[RemovedAttributeInAssembly ("library.dll", "Mono.Linker.Tests.Cases.LinkAttributes.Dependencies.TestRemoveAttribute")]
class EmbeddedLinkAttributesInReferencedAssembly_AssemblyLevel
{
public static void Main ()
{
ReferenceOtherAssembly ();
}
[Kept]
public static void ReferenceOtherAssembly ()
{
var _1 = new ReferencedAssemblyWithAttributes ();
}
}
}
|