29 строки
949 B
C#
29 строки
949 B
C#
using System;
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
%USING%
|
|
|
|
namespace Xamarin.iOS.UnitTests {
|
|
// autogenerated class that uses types from the test assemblies so that
|
|
// they are aot and not linked away.
|
|
public static class RegisterType
|
|
{
|
|
public static bool IsXUnit = %IS XUNIT%;
|
|
public static Dictionary <string, Type> TypesToRegister = new Dictionary <string, Type> {
|
|
%KEY VALUES%
|
|
};
|
|
|
|
public static void RegisterTypes ()
|
|
{
|
|
// line used to ensure that the runner is not remove by the linker :/
|
|
Console.WriteLine ($"Got the runner for the linker {typeof(Xunit.Sdk.TypeUtility)}");
|
|
foreach (var a in TypesToRegister.Keys) {
|
|
// do something with the type, so that it is not removed
|
|
var assemblyPath = Path.GetFileName (TypesToRegister[a].Assembly.Location);
|
|
Console.WriteLine ($"We are using type {TypesToRegister[a]} from assembly {assemblyPath}");
|
|
}
|
|
}
|
|
}
|
|
} |