Welcome to mirror list, hosted at ThFree Co, Russian Federation.

UnusedAttributeWithTypeForwarderIsRemoved.cs « OnlyKeepUsed « Attributes « Mono.Linker.Tests.Cases « test - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 52afdeaae359ccd920a8f2fb7e32aa1d8a0c0480 (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
using System;
using Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed.Dependencies;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;

namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed
{
	[KeepTypeForwarderOnlyAssemblies ("true")]
	[SetupLinkerArgument ("--used-attrs-only", "true")]
	[SetupCompileBefore ("library.dll", new[] { "Dependencies/UnusedAttributeWithTypeForwarderIsRemoved_Lib.cs" })]
	[SetupCompileAfter ("implementation.dll", new[] { "Dependencies/UnusedAttributeWithTypeForwarderIsRemoved_Lib.cs" })]
	[SetupCompileAfter ("library.dll", new[] { "Dependencies/UnusedAttributeWithTypeForwarderIsRemoved_Forwarder.cs" }, new[] { "implementation.dll" })]

	[RemovedTypeInAssembly ("library.dll", typeof (UnusedAttributeWithTypeForwarderIsRemoved_LibAttribute))]
	[RemovedTypeInAssembly ("implementation.dll", typeof (UnusedAttributeWithTypeForwarderIsRemoved_LibAttribute))]
	class UnusedAttributeWithTypeForwarderIsRemoved
	{
		static void Main ()
		{
			Method (null);
		}

		[Kept]

		static void Method ([UnusedAttributeWithTypeForwarderIsRemoved_Lib ("")] string arg)
		{
			UnusedAttributeWithTypeForwarderIsRemoved_OtherUsedClass.UsedMethod ();
		}
	}
}