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

AttributeDefinedAndUsedInOtherAssemblyIsKept.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: 826ad0011d4c80fb2fad5d2bc051420c4aaa0d8a (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
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 {
	[SetupLinkerArgument ("--used-attrs-only", "true")]
	[SetupCompileBefore ("library.dll", new [] { "Dependencies/AttributeDefinedAndUsedInOtherAssemblyIsKept_Lib.cs" })]
	[KeptMemberInAssembly ("library.dll", typeof (AttributeDefinedAndUsedInOtherAssemblyIsKept_Lib.FooAttribute), ".ctor()")]
	class AttributeDefinedAndUsedInOtherAssemblyIsKept {
		static void Main ()
		{
			Method ();
		}

		[AttributeDefinedAndUsedInOtherAssemblyIsKept_Lib.Foo]
		[Kept]
		[KeptAttributeAttribute (typeof (AttributeDefinedAndUsedInOtherAssemblyIsKept_Lib.FooAttribute))]
		static void Method ()
		{
			AttributeDefinedAndUsedInOtherAssemblyIsKept_Lib.UseTheAttributeType ();
		}
	}
}