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

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

namespace Mono.Linker.Tests.Cases.Reflection
{
	[SetupCompileBefore ("library.dll", new[] { "Dependencies/AssemblyDependency.cs" })]
	[KeptAssembly ("library.dll")]
	[KeptTypeInAssembly ("library.dll", "Mono.Linker.Tests.Cases.Reflection.Dependencies.AssemblyDependency/TypeThatIsUsedViaReflection")]
	public class TypeUsedViaReflectionInDifferentAssembly
	{
		public static void Main ()
		{
			AssemblyDependency.UsedToKeepReferenceAtCompileTime ();
			Helper ();
		}

		[Kept]
		static Type Helper ()
		{
			return Type.GetType ("Mono.Linker.Tests.Cases.Reflection.Dependencies.AssemblyDependency+TypeThatIsUsedViaReflection, library");
		}
	}
}