Lucene.Net.Tests.QueryParser.Classic.TestQueryParser: Fixed compile issue (Reflection .GetTypeInfo() not called) on .NET Core.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/db85011e Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/db85011e Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/db85011e Branch: refs/heads/api-work Commit: db85011e3f1df76f913fc061d86587fbb7213b7f Parents: 046b812 Author: Shad Storhaug <[email protected]> Authored: Thu Mar 9 01:22:01 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Mar 9 01:22:01 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/db85011e/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs index d246c72..2db6fa2 100644 --- a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs +++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs @@ -9,6 +9,7 @@ using NUnit.Framework; using System; using System.Diagnostics; using System.Globalization; +using System.Reflection; namespace Lucene.Net.QueryParsers.Classic { @@ -144,7 +145,7 @@ namespace Lucene.Net.QueryParsers.Classic { try { - typeof(QueryParser).GetConstructor(new Type[] { typeof(ICharStream) }); + typeof(QueryParser).GetTypeInfo().GetConstructor(new Type[] { typeof(ICharStream) }); fail("please switch public QueryParser(CharStream) to be protected"); } catch (Exception /*nsme*/) @@ -153,7 +154,7 @@ namespace Lucene.Net.QueryParsers.Classic } try { - typeof(QueryParser).GetConstructor(new Type[] { typeof(QueryParserTokenManager) }); + typeof(QueryParser).GetTypeInfo().GetConstructor(new Type[] { typeof(QueryParserTokenManager) }); fail("please switch public QueryParser(QueryParserTokenManager) to be protected"); } catch (Exception /*nsme*/)
