Update tests to work with csc compiler

This commit is contained in:
Marek Safar 2017-03-08 10:29:12 +01:00
Родитель 3912019640
Коммит 226b34ea06
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -443,9 +443,12 @@ namespace LinkAll {
string GetField (object o, string s)
{
var f = o.GetType ().GetField (s, BindingFlags.Instance | BindingFlags.NonPublic);
if (f == null)
var type = o.GetType ();
var f1 = type.GetField (s, BindingFlags.Instance | BindingFlags.NonPublic);
var f2 = type.GetField (s + "i__Field", BindingFlags.Instance | BindingFlags.NonPublic);
if (f1 == null && f2 == null)
return s;
//Console.WriteLine (f.GetValue (o));
return null;
}