lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [5/8] lucenenet git commit: SWEEP: Removed FEATURE_EMBEDDED_RESOURCE and changed all code that accesses embedded resources to use a new set of extension methods that aggressively search the available resources for a string match or partial match. Since t
Date Sat, 08 Apr 2017 15:48:25 GMT
SWEEP: Removed FEATURE_EMBEDDED_RESOURCE and changed all code that accesses embedded resources to use a new set of extension methods that aggressively search the available resources for a string match or partial match. Since the CLI ignores the default namespace when embedding resources, this approach makes finding embedded resources reliable without making lots of special cases.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1743c9d8
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1743c9d8
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1743c9d8

Branch: refs/heads/api-work
Commit: 1743c9d874f4ac8a90cf60dac82c9da4eb9de807
Parents: 56bc9e0
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Apr 7 22:24:02 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Apr 8 22:42:51 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Ar/ArabicAnalyzer.cs               |   3 +-
 .../Analysis/Bg/BulgarianAnalyzer.cs            |   3 +-
 .../Analysis/Br/BrazilianAnalyzer.cs            |   3 +-
 .../Analysis/Ca/CatalanAnalyzer.cs              |   3 +-
 .../Analysis/Cjk/CJKAnalyzer.cs                 |   3 +-
 .../Analysis/Ckb/SoraniAnalyzer.cs              |   3 +-
 .../Compound/Hyphenation/PatternParser.cs       |   7 +-
 .../Analysis/Cz/CzechAnalyzer.cs                |   3 +-
 .../Analysis/Da/DanishAnalyzer.cs               |   3 +-
 .../Analysis/De/GermanAnalyzer.cs               |   3 +-
 .../Analysis/El/GreekAnalyzer.cs                |   3 +-
 .../Analysis/Es/SpanishAnalyzer.cs              |   3 +-
 .../Analysis/Eu/BasqueAnalyzer.cs               |   3 +-
 .../Analysis/Fa/PersianAnalyzer.cs              |   3 +-
 .../Analysis/Fi/FinnishAnalyzer.cs              |   3 +-
 .../Analysis/Fr/FrenchAnalyzer.cs               |   3 +-
 .../Analysis/Ga/IrishAnalyzer.cs                |   3 +-
 .../Analysis/Gl/GalicianAnalyzer.cs             |   3 +-
 .../Analysis/Hi/HindiAnalyzer.cs                |   3 +-
 .../Analysis/Hu/HungarianAnalyzer.cs            |   3 +-
 .../Analysis/Hy/ArmenianAnalyzer.cs             |   3 +-
 .../Analysis/Id/IndonesianAnalyzer.cs           |   3 +-
 .../Analysis/It/ItalianAnalyzer.cs              |   3 +-
 .../Analysis/Lv/LatvianAnalyzer.cs              |   3 +-
 .../Analysis/Nl/DutchAnalyzer.cs                |   3 +-
 .../Analysis/No/NorwegianAnalyzer.cs            |   3 +-
 .../Analysis/Pt/PortugueseAnalyzer.cs           |   3 +-
 .../Analysis/Pt/RSLPStemmerBase.cs              |   2 +-
 .../Analysis/Ro/RomanianAnalyzer.cs             |   3 +-
 .../Analysis/Ru/RussianAnalyzer.cs              |   3 +-
 .../Analysis/Sv/SwedishAnalyzer.cs              |   3 +-
 .../Analysis/Th/ThaiAnalyzer.cs                 |   3 +-
 .../Analysis/Tr/TurkishAnalyzer.cs              |   6 +-
 .../Analysis/Util/AbstractAnalysisFactory.cs    |   2 +-
 .../Analysis/Util/ClasspathResourceLoader.cs    |  53 +------
 .../Analysis/Util/StopwordAnalyzerBase.cs       |   8 +-
 .../Analysis/Util/TypeExtensions.cs             |  32 -----
 .../Lucene.Net.Analysis.Common.csproj           |   3 +-
 src/Lucene.Net.Analysis.Common/project.json     |   2 +-
 .../Lucene.Net.Analysis.Stempel.csproj          |   3 +-
 .../Pl/PolishAnalyzer.cs                        |   7 +-
 .../Util/TypeExtensions.cs                      |  29 ----
 src/Lucene.Net.Analysis.Stempel/project.json    |   2 +-
 .../JS/JavascriptCompiler.cs                    |   5 +-
 .../JavaCompatibility/SystemTypesHelpers.cs     |   6 +-
 .../Lucene.Net.TestFramework.csproj             |   4 +-
 .../Util/LuceneTestCase.cs                      |   3 +-
 .../Commongrams/TestCommonGramsFilterFactory.cs |   2 +-
 .../TestCommonGramsQueryFilterFactory.cs        |   2 +-
 .../Synonym/TestSynonymFilterFactory.cs         |   2 +-
 .../Util/BaseTokenStreamFactoryTestCase.cs      |  16 +--
 .../Lucene.Net.Tests.Analysis.Common.csproj     |   2 +-
 .../Egothor.Stemmer/TestCompile.cs              |  10 +-
 .../TestPostingsHighlighter.cs                  |  23 +--
 src/Lucene.Net.Tests.Highlighter/project.json   |   2 +-
 .../MessagesTestBundleBundle.Designer.cs        |  27 ++--
 .../Xml/TestParser.cs                           |  15 +-
 .../Xml/TestQueryTemplateManager.cs             |   7 +-
 .../Queries/TestSlowFuzzyQuery2.cs              |  23 +--
 src/Lucene.Net.Tests.Sandbox/project.json       |   1 -
 .../StrategyTestCase.cs                         |   6 +-
 .../TestTestFramework.cs                        |   2 +-
 .../Suggest/LookupBenchmarkTest.cs              |   3 +-
 .../Index/TestBackwardsCompatibility.cs         |  11 +-
 .../Index/TestBackwardsCompatibility3x.cs       |   8 +-
 .../Support/TestDataInputStream.cs              |   8 +-
 src/Lucene.Net/Lucene.Net.csproj                |   3 +-
 src/Lucene.Net/Support/AssemblyExtensions.cs    | 142 +++++++++++++++++++
 .../Support/BundleResourceManagerFactory.cs     |  23 +--
 src/Lucene.Net/Util/IOUtils.cs                  |   2 +-
 70 files changed, 267 insertions(+), 337 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicAnalyzer.cs
index e484850..c9a3495 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicAnalyzer.cs
@@ -76,8 +76,7 @@ namespace Lucene.Net.Analysis.Ar
             {
                 try
                 {
-                    var resource = typeof(ArabicAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(ArabicAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(ArabicAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianAnalyzer.cs
index cab90fa..cac88af 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianAnalyzer.cs
@@ -68,8 +68,7 @@ namespace Lucene.Net.Analysis.Bg
             {
                 try
                 {
-                    var resource = typeof(BulgarianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(BulgarianAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(BulgarianAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs
index df78414..1b5edf7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs
@@ -62,9 +62,8 @@ namespace Lucene.Net.Analysis.Br
             {
                 try
                 {
-                    var resource = typeof(BrazilianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetWordSet(
-                        IOUtils.GetDecodingReader(typeof(BrazilianAnalyzer), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(BrazilianAnalyzer), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
                         "#",
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Ca/CatalanAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ca/CatalanAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ca/CatalanAnalyzer.cs
index a33ebb6..ab39999 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ca/CatalanAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ca/CatalanAnalyzer.cs
@@ -74,8 +74,7 @@ namespace Lucene.Net.Analysis.Ca
             {
                 try
                 {
-                    var resource = typeof(CatalanAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(CatalanAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(CatalanAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Cjk/CJKAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Cjk/CJKAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Cjk/CJKAnalyzer.cs
index 28c7a52..53c9732 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Cjk/CJKAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Cjk/CJKAnalyzer.cs
@@ -59,8 +59,7 @@ namespace Lucene.Net.Analysis.Cjk
             {
                 try
                 {
-                    var resource = typeof(CJKAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(CJKAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(CJKAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs
index 7f7bfa8..e99d70f 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs
@@ -60,9 +60,8 @@ namespace Lucene.Net.Analysis.Ckb
             {
                 try
                 {
-                    var resource = typeof(SoraniAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetWordSet(
-                        IOUtils.GetDecodingReader(typeof(SoraniAnalyzer), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SoraniAnalyzer), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/PatternParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/PatternParser.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/PatternParser.cs
index 4e1dac3..57617be 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/PatternParser.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/PatternParser.cs
@@ -1,7 +1,9 @@
-using System;
+using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Reflection;
 using System.Text;
 using System.Xml;
 
@@ -402,8 +404,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation
                 string dtdFilename = "hyphenation.dtd";
                 if (dtdFilename.Equals(absoluteUri.Segments.LastOrDefault()))
                 {
-                    var qualifedDtdFilename = string.Concat(GetType().Namespace, ".", dtdFilename);
-                    return GetType().Assembly.GetManifestResourceStream(qualifedDtdFilename);
+                    return GetType().GetTypeInfo().Assembly.FindAndGetManifestResourceStream(typeof(PatternParser), dtdFilename);
                 }
 
                 return base.GetEntity(absoluteUri, role, ofObjectToReturn);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechAnalyzer.cs
index 25b0b12..5efdf4b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechAnalyzer.cs
@@ -71,9 +71,8 @@ namespace Lucene.Net.Analysis.Cz
             {
                 try
                 {
-                    var resource = typeof(CzechAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_SET = WordlistLoader.GetWordSet(
-                        IOUtils.GetDecodingReader(typeof(CzechAnalyzer), resource, Encoding.UTF8), 
+                        IOUtils.GetDecodingReader(typeof(CzechAnalyzer), DEFAULT_STOPWORD_FILE, Encoding.UTF8), 
                         "#",
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
index 308e4f9..453e9c6 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
@@ -62,9 +62,8 @@ namespace Lucene.Net.Analysis.Da
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
index 1d8dc9d..19a46d4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
@@ -100,9 +100,8 @@ namespace Lucene.Net.Analysis.De
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/El/GreekAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/El/GreekAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/El/GreekAnalyzer.cs
index 4ea3845..db0e978 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/El/GreekAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/El/GreekAnalyzer.cs
@@ -67,8 +67,7 @@ namespace Lucene.Net.Analysis.El
             {
                 try
                 {
-                    var resource = typeof(GreekAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_SET = LoadStopwordSet(false, typeof(GreekAnalyzer), resource, "#");
+                    DEFAULT_SET = LoadStopwordSet(false, typeof(GreekAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
index 4e0062b..de05df7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
@@ -70,9 +70,8 @@ namespace Lucene.Net.Analysis.Es
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
index 621c6a6..9e4a7e9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
@@ -61,8 +61,7 @@ namespace Lucene.Net.Analysis.Eu
             {
                 try
                 {
-                    var resource = typeof(BasqueAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(BasqueAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(BasqueAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
index 0e837ca..7c4fe02 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
@@ -74,8 +74,7 @@ namespace Lucene.Net.Analysis.Fa
             {
                 try
                 {
-                    var resource = typeof(PersianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(PersianAnalyzer), resource, STOPWORDS_COMMENT);
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(PersianAnalyzer), DEFAULT_STOPWORD_FILE, STOPWORDS_COMMENT);
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
index 99c0d41..18f7df4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
@@ -62,9 +62,8 @@ namespace Lucene.Net.Analysis.Fi
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
index 7ec11c3..a2a99ac 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
@@ -121,9 +121,8 @@ namespace Lucene.Net.Analysis.Fr
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
index 528d7f7..1d5d0ce 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
@@ -79,8 +79,7 @@ namespace Lucene.Net.Analysis.Ga
             {
                 try
                 {
-                    var resource = typeof(IrishAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(IrishAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(IrishAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
index 0e38cfa..7130348 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
@@ -60,9 +60,8 @@ namespace Lucene.Net.Analysis.Gl
             {
                 try
                 {
-                    var resource = typeof(GalicianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetWordSet(
-                        IOUtils.GetDecodingReader(typeof(GalicianAnalyzer), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(GalicianAnalyzer), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
index 2025cac..9ee40ac 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
@@ -71,8 +71,7 @@ namespace Lucene.Net.Analysis.Hi
             {
                 try
                 {
-                    var resource = typeof(HindiAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(HindiAnalyzer), resource, STOPWORDS_COMMENT);
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(HindiAnalyzer), DEFAULT_STOPWORD_FILE, STOPWORDS_COMMENT);
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
index 6951d32..6e7fe57 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
@@ -62,9 +62,8 @@ namespace Lucene.Net.Analysis.Hu
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
index f6a5cdc..6611208 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
@@ -61,8 +61,7 @@ namespace Lucene.Net.Analysis.Hy
             {
                 try
                 {
-                    var resource = typeof(ArmenianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(ArmenianAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(ArmenianAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
index 74e1818..eb74551 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
@@ -57,8 +57,7 @@ namespace Lucene.Net.Analysis.Id
             {
                 try
                 {
-                    var resource = typeof(IndonesianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(IndonesianAnalyzer), resource, "#");
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(IndonesianAnalyzer), DEFAULT_STOPWORD_FILE, "#");
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianAnalyzer.cs
index e9ccce6..6ef83dc 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianAnalyzer.cs
@@ -78,9 +78,8 @@ namespace Lucene.Net.Analysis.It
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
index 7b1828f..fb643f8 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
@@ -60,9 +60,8 @@ namespace Lucene.Net.Analysis.Lv
             {
                 try
                 {
-                    var resource = typeof(LatvianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetWordSet(
-                        IOUtils.GetDecodingReader(typeof(LatvianAnalyzer), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(LatvianAnalyzer), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
index 153de62..0718e8d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
@@ -80,9 +80,8 @@ namespace Lucene.Net.Analysis.Nl
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
index 70f9fc5..206e45d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
@@ -62,9 +62,8 @@ namespace Lucene.Net.Analysis.No
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseAnalyzer.cs
index 066c62a..c31fccd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseAnalyzer.cs
@@ -67,9 +67,8 @@ namespace Lucene.Net.Analysis.Pt
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs b/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
index 3b5fcfa..04b6c1d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
@@ -279,7 +279,7 @@ namespace Lucene.Net.Analysis.Pt
         {
             IDictionary<string, Step> steps = new Dictionary<string, Step>();
 
-            using (TextReader r = IOUtils.GetDecodingReader(clazz, clazz.GetAnalysisResourceName(resource), Encoding.UTF8))
+            using (TextReader r = IOUtils.GetDecodingReader(clazz, resource, Encoding.UTF8))
             {
                 string step;
                 while ((step = ReadLine(r)) != null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Ro/RomanianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ro/RomanianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ro/RomanianAnalyzer.cs
index dca59e8..83f9b53 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ro/RomanianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ro/RomanianAnalyzer.cs
@@ -66,8 +66,7 @@ namespace Lucene.Net.Analysis.Ro
             {
                 try
                 {
-                    var resource = typeof(RomanianAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(RomanianAnalyzer), resource, STOPWORDS_COMMENT);
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(RomanianAnalyzer), DEFAULT_STOPWORD_FILE, STOPWORDS_COMMENT);
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianAnalyzer.cs
index 1e26a34..ad8e0ea 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianAnalyzer.cs
@@ -77,9 +77,8 @@ namespace Lucene.Net.Analysis.Ru
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishAnalyzer.cs
index d2572ba..a54ec89 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishAnalyzer.cs
@@ -62,9 +62,8 @@ namespace Lucene.Net.Analysis.Sv
             {
                 try
                 {
-                    var resource = typeof(SnowballFilter).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetSnowballWordSet(
-                        IOUtils.GetDecodingReader(typeof(SnowballFilter), resource, Encoding.UTF8),
+                        IOUtils.GetDecodingReader(typeof(SnowballFilter), DEFAULT_STOPWORD_FILE, Encoding.UTF8),
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
index 440e4b1..357d447 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
@@ -67,8 +67,7 @@ namespace Lucene.Net.Analysis.Th
             {
                 try
                 {
-                    var resource = typeof(ThaiAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(ThaiAnalyzer), resource, STOPWORDS_COMMENT);
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(ThaiAnalyzer), DEFAULT_STOPWORD_FILE, STOPWORDS_COMMENT);
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
index 17b7a2a..c7212a0 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
@@ -68,11 +68,7 @@ namespace Lucene.Net.Analysis.Tr
             {
                 try
                 {
-                    var resource = typeof(TurkishAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
-                    DEFAULT_STOP_SET = LoadStopwordSet(
-                        false,
-                        typeof(TurkishAnalyzer), resource,
-                        STOPWORDS_COMMENT);
+                    DEFAULT_STOP_SET = LoadStopwordSet(false, typeof(TurkishAnalyzer), DEFAULT_STOPWORD_FILE, STOPWORDS_COMMENT);
                 }
                 catch (IOException)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
index 0fef5cf..a3ec443 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
@@ -360,7 +360,7 @@ namespace Lucene.Net.Analysis.Util
             {
                 // default stopwords list has 35 or so words, but maybe don't make it that
                 // big to start
-                words = new CharArraySet(m_luceneMatchVersion, files.Count() * 10, ignoreCase);
+                words = new CharArraySet(m_luceneMatchVersion, files.Count * 10, ignoreCase);
                 foreach (string file in files)
                 {
                     var wlist = GetLines(loader, file.Trim());

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
index 19abbd8..c6ecdcf 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
@@ -1,6 +1,6 @@
-using System;
+using Lucene.Net.Support;
+using System;
 using System.IO;
-using System.Text.RegularExpressions;
 using System.Reflection;
 
 namespace Lucene.Net.Analysis.Util
@@ -32,7 +32,6 @@ namespace Lucene.Net.Analysis.Util
         // LUCENENET NOTE: This class was refactored significantly from its Java counterpart.
 
         private readonly Type clazz;
-        private readonly string namespaceExcludeRegex;
 
         /// <summary>
         /// Creates an instance using the System.Assembly of the given class to load Resources and classes
@@ -43,29 +42,12 @@ namespace Lucene.Net.Analysis.Util
             this.clazz = clazz;
         }
 
-        /// <summary>
-        /// Creates an instance using the System.Assembly of the given class to load Resources and classes
-        /// Resource names are relative to the resourcePrefix.
-        /// </summary>
-        /// <param name="clazz">The class type</param>
-        /// <param name="namespaceExcludeRegex">Removes the part of the namespace of the class that matches the regex. 
-        /// This is useful to get to the resource if the assembly name and namespace name don't happen to match.
-        /// If provided, the assembly name will be concatnated with the namespace name (excluding the part tha matches the regex)
-        /// to provide the complete path to the embedded resource in the assembly. Note you can view the entire path to all of 
-        /// the resources by calling Assembly.GetManifestResourceNames() so you can better understand how to build this path.</param>
-        public ClasspathResourceLoader(Type clazz, string namespaceExcludeRegex)
-        {
-            this.clazz = clazz;
-            this.namespaceExcludeRegex = namespaceExcludeRegex;
-        }
-
         public Stream OpenResource(string resource)
         {
-            var qualifiedResourceName = this.GetQualifiedResourceName(resource);
-            Stream stream = this.clazz.GetTypeInfo().Assembly.GetManifestResourceStream(qualifiedResourceName);
+            Stream stream = this.clazz.GetTypeInfo().Assembly.FindAndGetManifestResourceStream(clazz, resource);
             if (stream == null)
             {
-                throw new IOException("Resource not found: " + qualifiedResourceName);
+                throw new IOException("Resource not found: " + resource);
             }
             return stream;
         }
@@ -104,32 +86,5 @@ namespace Lucene.Net.Analysis.Util
                 throw new Exception("Cannot create instance: " + cname, e);
             }
         }
-
-        /// <summary>
-        /// LUCENENET: Added for .NET help in finding the resource name.
-        /// </summary>
-        /// <param name="resource"></param>
-        /// <returns></returns>
-        private string GetQualifiedResourceName(string resource) 
-        {
-            // LUCENENET TODO: Need to ensure this works in .NET Core (and perhaps refactor to make it more reliable).
-            // Perhaps it would make more sense to use Assembly.GetManifestResourceStream(Type, string), which allows
-            // you to filter by the namespace of a Type.
-
-            var namespaceName = this.clazz.Namespace;
-            var assemblyName = clazz.GetTypeInfo().Assembly.GetName().Name;
-            if (string.IsNullOrEmpty(this.namespaceExcludeRegex) && (assemblyName.Equals(namespaceName, StringComparison.OrdinalIgnoreCase)))
-                return namespaceName;
-
-            string namespaceSegment = "";
-            if (!string.IsNullOrEmpty(this.namespaceExcludeRegex))
-            {
-                // Remove the part of the path that matches the Regex.
-                namespaceSegment = Regex.Replace(namespaceName, this.namespaceExcludeRegex, string.Empty, RegexOptions.Compiled);
-            }
-
-            // Qualify by namespace and separate by .
-            return string.Concat(assemblyName, ".", namespaceSegment.Trim('.'), ".", resource).Replace("..", ".");
-        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Util/StopwordAnalyzerBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/StopwordAnalyzerBase.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/StopwordAnalyzerBase.cs
index 98d71c9..29ea3e2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/StopwordAnalyzerBase.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/StopwordAnalyzerBase.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Util;
+using Lucene.Net.Support;
+using Lucene.Net.Util;
 using System;
 using System.IO;
 using System.Reflection;
@@ -95,10 +96,7 @@ namespace Lucene.Net.Analysis.Util
             TextReader reader = null;
             try
             {
-                //var resourceNames = aClass.GetTypeInfo().Assembly.GetManifestResourceNames();
-                // LUCENENET TODO: Maybe it would make more sense to use this overload?
-                //var resourceStream = aClass.GetTypeInfo().Assembly.GetManifestResourceStream(aClass, resource);
-                var resourceStream = aClass.GetTypeInfo().Assembly.GetManifestResourceStream(resource);
+                var resourceStream = aClass.GetTypeInfo().Assembly.FindAndGetManifestResourceStream(aClass, resource);
                 reader = IOUtils.GetDecodingReader(resourceStream, Encoding.UTF8);
                 return WordlistLoader.GetWordSet(reader, comment, new CharArraySet(
 #pragma warning disable 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Analysis/Util/TypeExtensions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/TypeExtensions.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/TypeExtensions.cs
deleted file mode 100644
index e6f5d2e..0000000
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/TypeExtensions.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using System.Reflection;
-
-namespace Lucene.Net.Analysis.Util
-{
-    internal static class TypeExtensions
-    {
-        // LUCENENET TODO: Try to eliminate this class by using Assembly.GetManifestResourceStream(Type, string), if possible.
-        // If not possible, perhaps we should move this and BufferedCharFilter into a Support namespace here in Analysis.Common ?
-
-        /// <summary>
-        /// LUCENENET specific:
-        /// In .NET Core, resources are embedded with the namespace based on
-        /// the physical location they are located in preceded by the name of
-        /// the assembly.
-        /// For example, the file: Analysis/Bg/stopwords.txt, would have the
-        /// resource name `Lucene.Net.Analysis.Common.Analysis.Bg.stopwords.txt`
-        /// Taken from: Lucene.Net.TestFramework.SystemTypesHelpers.getResourceAsStream
-        /// </summary>
-        internal static string GetAnalysisResourceName(this Type type, string filename)
-        {
-#if FEATURE_EMBEDDED_RESOURCE
-            Assembly assembly = type.GetTypeInfo().Assembly;
-            string namespaceSegment = type.Namespace.Replace("Lucene.Net", string.Empty);
-            string assemblyName = assembly.GetName().Name;
-            return string.Concat(assemblyName, namespaceSegment, ".", filename);
-#else
-            return string.Format("{0}.{1}", type.Namespace, filename);
-#endif
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
index 76bde74..7c169e4 100644
--- a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
+++ b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
@@ -457,7 +457,6 @@
     <Compile Include="Analysis\Util\StopwordAnalyzerBase.cs" />
     <Compile Include="Analysis\Util\TokenFilterFactory.cs" />
     <Compile Include="Analysis\Util\TokenizerFactory.cs" />
-    <Compile Include="Analysis\Util\TypeExtensions.cs" />
     <Compile Include="Analysis\Util\WordlistLoader.cs" />
     <Compile Include="Analysis\Wikipedia\WikipediaTokenizer.cs" />
     <Compile Include="Analysis\Wikipedia\WikipediaTokenizerFactory.cs" />
@@ -493,7 +492,7 @@
     <Compile Include="Tartarus\Snowball\Ext\SwedishStemmer.cs" />
     <Compile Include="Tartarus\Snowball\Ext\TurkishStemmer.cs" />
     <Compile Include="Tartarus\Snowball\SnowballProgram.cs" />
-	<Compile Include="..\CommonAssemblyInfo.cs">
+    <Compile Include="..\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Common/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/project.json b/src/Lucene.Net.Analysis.Common/project.json
index 69bdb4c..321e026 100644
--- a/src/Lucene.Net.Analysis.Common/project.json
+++ b/src/Lucene.Net.Analysis.Common/project.json
@@ -44,7 +44,7 @@
         "NETStandard.Library": "1.6.0"
       },
       "buildOptions": {
-        "define": [ "NETSTANDARD", "FEATURE_EMBEDDED_RESOURCE" ]
+        "define": [ "NETSTANDARD" ]
       }
     },
     "net451": {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj b/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
index 0d77053..20cd5b1 100644
--- a/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
+++ b/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
@@ -59,8 +59,7 @@
     <Compile Include="Stempel\StempelFilter.cs" />
     <Compile Include="Stempel\StempelPolishStemFilterFactory.cs" />
     <Compile Include="Stempel\StempelStemmer.cs" />
-    <Compile Include="Util\TypeExtensions.cs" />
-	<Compile Include="..\CommonAssemblyInfo.cs">
+    <Compile Include="..\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs b/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
index acfe570..aba1488 100644
--- a/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
@@ -4,6 +4,7 @@ using Lucene.Net.Analysis.Miscellaneous;
 using Lucene.Net.Analysis.Standard;
 using Lucene.Net.Analysis.Stempel;
 using Lucene.Net.Analysis.Util;
+using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
 using System.IO;
@@ -78,9 +79,8 @@ namespace Lucene.Net.Analysis.Pl
             {
                 try
                 {
-                    var resource = typeof(PolishAnalyzer).GetAnalysisResourceName(DEFAULT_STOPWORD_FILE);
                     DEFAULT_STOP_SET = WordlistLoader.GetWordSet(IOUtils.GetDecodingReader(typeof(PolishAnalyzer),
-                        resource, Encoding.UTF8), "#",
+                        DEFAULT_STOPWORD_FILE, Encoding.UTF8), "#",
 #pragma warning disable 612, 618
                         LuceneVersion.LUCENE_CURRENT);
 #pragma warning restore 612, 618
@@ -94,8 +94,7 @@ namespace Lucene.Net.Analysis.Pl
 
                 try
                 {
-                    var resource = typeof(PolishAnalyzer).GetAnalysisResourceName(DEFAULT_STEMMER_FILE);
-                    DEFAULT_TABLE = StempelStemmer.Load(typeof(PolishAnalyzer).GetTypeInfo().Assembly.GetManifestResourceStream(resource));
+                    DEFAULT_TABLE = StempelStemmer.Load(typeof(PolishAnalyzer).GetTypeInfo().Assembly.FindAndGetManifestResourceStream(typeof(PolishAnalyzer), DEFAULT_STEMMER_FILE));
                 }
                 catch (IOException ex)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Stempel/Util/TypeExtensions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Util/TypeExtensions.cs b/src/Lucene.Net.Analysis.Stempel/Util/TypeExtensions.cs
deleted file mode 100644
index 9936171..0000000
--- a/src/Lucene.Net.Analysis.Stempel/Util/TypeExtensions.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Reflection;
-
-namespace Lucene.Net.Analysis.Util
-{
-    internal static class TypeExtensions
-    {
-        /// <summary>
-        /// LUCENENET specific:
-        /// In .NET Core, resources are embedded with the namespace based on
-        /// the physical location they are located in preceded by the name of
-        /// the assembly.
-        /// For example, the file: Pl/stopwords.txt, would have the
-        /// resource name `Lucene.Net.Analysis.Stempel.Pl.stopwords.txt`
-        /// Adapted from: Lucene.Net.TestFramework.SystemTypesHelpers.getResourceAsStream
-        /// </summary>
-        internal static string GetAnalysisResourceName(this Type type, string filename)
-        {
-#if FEATURE_EMBEDDED_RESOURCE
-            Assembly assembly = type.GetTypeInfo().Assembly;
-            string namespaceSegment = type.Namespace.Replace("Lucene.Net.Analysis", string.Empty);
-            string assemblyName = assembly.GetName().Name;
-            return string.Concat(assemblyName, namespaceSegment, ".", filename);
-#else
-            return string.Format("{0}.{1}", type.Namespace, filename);
-#endif
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Analysis.Stempel/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/project.json b/src/Lucene.Net.Analysis.Stempel/project.json
index 27dc855..2893bd5 100644
--- a/src/Lucene.Net.Analysis.Stempel/project.json
+++ b/src/Lucene.Net.Analysis.Stempel/project.json
@@ -32,7 +32,7 @@
     "netstandard1.5": {
       "imports": "dnxcore50",
       "buildOptions": {
-        "define": [ "NETSTANDARD", "FEATURE_EMBEDDED_RESOURCE" ]
+        "define": [ "NETSTANDARD" ]
       },
       "dependencies": {
         "NETStandard.Library": "1.6.0"

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs b/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
index dd1896b..75052a8 100644
--- a/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
+++ b/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
@@ -660,10 +660,11 @@ namespace Lucene.Net.Expressions.JS
         {
 #if NETSTANDARD
             var assembly = typeof(JavascriptCompiler).GetTypeInfo().Assembly;
-            var settingsFile = string.Join(".", assembly.GetName().Name, "Properties", "Settings.settings");
+            //var settingsFile = string.Join(".", assembly.GetName().Name, "Properties", "Settings.settings");
+            var settingsFile = string.Join(".", "Properties", "Settings.settings");
             string contents;
 
-            using (var reader = new StreamReader(assembly.GetManifestResourceStream(settingsFile)))
+            using (var reader = new StreamReader(assembly.FindAndGetManifestResourceStream(typeof(JavascriptCompiler), settingsFile)))
             {
                 contents = reader.ReadToEnd();
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs b/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs
index d3db4b2..b99c55d 100644
--- a/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs
+++ b/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs
@@ -256,11 +256,7 @@ namespace Lucene.Net
         /// </summary>
         public static Stream getResourceAsStream(this Type t, string name)
         {
-            Assembly assembly = t.GetTypeInfo().Assembly;
-            string namespaceSegment = t.Namespace.Replace("Lucene.Net", string.Empty);
-            string assemblyName = assembly.GetName().Name;
-            string fullResourcePath = string.Concat(assemblyName, namespaceSegment, ".", name);
-            return assembly.GetManifestResourceStream(fullResourcePath);
+            return t.GetTypeInfo().Assembly.FindAndGetManifestResourceStream(t, name);
         }
 
         public static int read(this TextReader reader, char[] buffer)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index 9de800c..87d0952 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -21,7 +21,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>TRACE;FEATURE_SERIALIZABLE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <Prefer32Bit>false</Prefer32Bit>
@@ -477,7 +477,7 @@
     <Compile Include="JavaCompatibility\LuceneTypesHelpers.cs" />
     <Compile Include="JavaCompatibility\SystemTypesHelpers.cs" />
     <Compile Include="Util\VirtualMethod.cs" />
-	<Compile Include="..\CommonAssemblyInfo.cs">
+    <Compile Include="..\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index b0a1a49..dc73e62 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -1811,8 +1811,7 @@ namespace Lucene.Net.Util
         {
             try
             {
-                var resourceLoader = new ClasspathResourceLoader(this.GetType(), "Lucene.Net");
-                return resourceLoader.OpenResource(name);
+                return this.GetType().getResourceAsStream(name);
             }
 #pragma warning disable 168
             catch (Exception e)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsFilterFactory.cs
index aa45eb4..5c98ee0 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsFilterFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsFilterFactory.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Analysis.CommonGrams
         public virtual void TestInform()
         {
             //IResourceLoader loader = new ClasspathResourceLoader(typeof(TestStopFilter));
-            IResourceLoader loader = new ClasspathResourceLoader(typeof(TestAnalyzers), "Lucene.Net"); // LUCENENET: Need to set to a type that is in the same path as the files
+            IResourceLoader loader = new ClasspathResourceLoader(typeof(TestAnalyzers)); // LUCENENET: Need to set to a type that is in the same path as the files
             assertTrue("loader is null and it shouldn't be", loader != null);
             CommonGramsFilterFactory factory = (CommonGramsFilterFactory)TokenFilterFactory("CommonGrams", TEST_VERSION_CURRENT, loader, "words", "stop-1.txt", "ignoreCase", "true");
             CharArraySet words = factory.CommonWords;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsQueryFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsQueryFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsQueryFilterFactory.cs
index 21df759..9bf6714 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsQueryFilterFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Commongrams/TestCommonGramsQueryFilterFactory.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Analysis.CommonGrams
         public virtual void TestInform()
         {
             //IResourceLoader loader = new ClasspathResourceLoader(typeof(TestStopFilter));
-            IResourceLoader loader = new ClasspathResourceLoader(typeof(TestAnalyzers), "Lucene.Net"); // LUCENENET: Need to set to a type that is in the same path as the files
+            IResourceLoader loader = new ClasspathResourceLoader(typeof(TestAnalyzers)); // LUCENENET: Need to set to a type that is in the same path as the files
             assertTrue("loader is null and it shouldn't be", loader != null);
             CommonGramsQueryFilterFactory factory = (CommonGramsQueryFilterFactory)TokenFilterFactory("CommonGramsQuery", TEST_VERSION_CURRENT, loader, "words", "stop-1.txt", "ignoreCase", "true");
             CharArraySet words = factory.CommonWords;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymFilterFactory.cs
index ddb077b..058c27d 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymFilterFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymFilterFactory.cs
@@ -68,7 +68,7 @@ namespace Lucene.Net.Analysis.Synonym
         {
             Reader reader = new StringReader("GB");
             TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
-            stream = TokenFilterFactory("Synonym", Version.LUCENE_33, new ClasspathResourceLoader(this.GetType(), "Lucene.Net"), "synonyms", "synonyms.txt").Create(stream);
+            stream = TokenFilterFactory("Synonym", Version.LUCENE_33, new ClasspathResourceLoader(this.GetType()), "synonyms", "synonyms.txt").Create(stream);
             assertTrue(stream is SlowSynonymFilter);
             AssertTokenStreamContents(stream, new string[] { "GB", "gib", "gigabyte", "gigabytes" }, new int[] { 1, 0, 0, 0 });
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/BaseTokenStreamFactoryTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/BaseTokenStreamFactoryTestCase.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/BaseTokenStreamFactoryTestCase.cs
index af8103b..7924089 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/BaseTokenStreamFactoryTestCase.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/BaseTokenStreamFactoryTestCase.cs
@@ -110,7 +110,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         protected internal virtual TokenizerFactory TokenizerFactory(string name, Version version, params string[] keysAndValues)
         {
-            return TokenizerFactory(name, version, GetCurrentTypeResourceLoader(), keysAndValues);
+            return TokenizerFactory(name, version, new ClasspathResourceLoader(this.GetType()), keysAndValues);
         }
 
         /// <summary>
@@ -129,7 +129,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         protected internal virtual TokenFilterFactory TokenFilterFactory(string name, Version version, params string[] keysAndValues)
         {
-            return TokenFilterFactory(name, version, GetCurrentTypeResourceLoader(), keysAndValues);
+            return TokenFilterFactory(name, version, new ClasspathResourceLoader(this.GetType()), keysAndValues);
         }
 
         /// <summary>
@@ -158,7 +158,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         protected internal virtual CharFilterFactory CharFilterFactory(string name, params string[] keysAndValues)
         {
-            return CharFilterFactory(name, TEST_VERSION_CURRENT, GetCurrentTypeResourceLoader(), keysAndValues);
+            return CharFilterFactory(name, TEST_VERSION_CURRENT, new ClasspathResourceLoader(this.GetType()), keysAndValues);
         }
 
         /// <summary>
@@ -169,15 +169,5 @@ namespace Lucene.Net.Analysis.Util
         {
             return (CharFilterFactory)AnalysisFactory(Lucene.Net.Analysis.Util.CharFilterFactory.LookupClass(name), matchVersion, loader, keysAndValues);
         }
-
-        /// <summary>
-        /// Added for .NET support. Since the namespace of the classes don't match the assembly name, we need to
-        /// exclude part of the namespace.
-        /// </summary>
-        /// <returns></returns>
-        protected internal virtual IResourceLoader GetCurrentTypeResourceLoader()
-        {
-            return new ClasspathResourceLoader(this.GetType(), "Lucene.Net");
-        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
index 0958d2f..4ca6bfc 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
@@ -320,7 +320,7 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Support\TestExceptionSerialization.cs" />
     <Compile Include="Support\TestApiConsistency.cs" />
-	<Compile Include="..\CommonAssemblyInfo.cs">
+    <Compile Include="..\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
index 7678ba6..b8dec71 100644
--- a/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
@@ -65,16 +65,14 @@ namespace Egothor.Stemmer
 {
     public class TestCompile_ : LuceneTestCase
     {
-        private const string RULES_FILE = "Lucene.Net.Tests.Analysis.Stempel.Egothor.Stemmer.testRules.txt";
-
         [Test]
         public void TestCompile()
         {
             DirectoryInfo dir = CreateTempDir("testCompile");
             dir.Create();
             FileInfo output;
-            
-            using (Stream input = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(RULES_FILE))
+
+            using (Stream input = GetType().GetTypeInfo().Assembly.FindAndGetManifestResourceStream(GetType(), "testRules.txt"))
             {
                 output = new FileInfo(Path.Combine(dir.FullName, "testRules.txt"));
                 Copy(input, output);
@@ -94,7 +92,7 @@ namespace Egothor.Stemmer
             DirectoryInfo dir = CreateTempDir("testCompile");
             dir.Create();
             FileInfo output;
-            using (Stream input = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(RULES_FILE))
+            using (Stream input = GetType().GetTypeInfo().Assembly.FindAndGetManifestResourceStream(GetType(), "testRules.txt"))
             {
                 output = new FileInfo(Path.Combine(dir.FullName, "testRules.txt"));
                 Copy(input, output);
@@ -114,7 +112,7 @@ namespace Egothor.Stemmer
             DirectoryInfo dir = CreateTempDir("testCompile");
             dir.Create();
             FileInfo output;
-            using (Stream input = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(RULES_FILE))
+            using (Stream input = GetType().GetTypeInfo().Assembly.FindAndGetManifestResourceStream(GetType(), "testRules.txt"))
             {
                 output = new FileInfo(Path.Combine(dir.FullName, "testRules.txt"));
                 Copy(input, output);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
index b062fcb..a874f2d 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
@@ -517,7 +517,7 @@ namespace Lucene.Net.Search.PostingsHighlight
         public void TestCambridgeMA()
         {
             String text;
-            using (TextReader r = new StreamReader(getResourceAsStream(this.GetType(), "CambridgeMA.utf8"), Encoding.UTF8))
+            using (TextReader r = new StreamReader(this.GetType().getResourceAsStream("CambridgeMA.utf8"), Encoding.UTF8))
             {
                 text = r.ReadLine();
             }
@@ -549,27 +549,6 @@ namespace Lucene.Net.Search.PostingsHighlight
             dir.Dispose();
         }
 
-        private Stream getResourceAsStream(Type type, string filename)
-        {
-            var assembly = type.GetTypeInfo().Assembly;
-
-#if FEATURE_EMBEDDED_RESOURCE
-            string namespaceSegment = type.Namespace.Replace("Lucene.Net.Search", string.Empty);
-            string assemblyName = assembly.GetName().Name;
-            var name = string.Concat(assemblyName, namespaceSegment, ".", filename);
-#else
-            var name = string.Join(".", type.Namespace, filename);
-#endif
-            var stream = assembly.GetManifestResourceStream(name);
-
-            if (stream == default(Stream))
-            {
-                throw new ArgumentException($"Could not find a resource with the name: {name}");
-            }
-
-            return stream;
-        }
-
         [Test]
         public void TestPassageRanking()
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Highlighter/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/project.json b/src/Lucene.Net.Tests.Highlighter/project.json
index 1354f51..88d8bc7 100644
--- a/src/Lucene.Net.Tests.Highlighter/project.json
+++ b/src/Lucene.Net.Tests.Highlighter/project.json
@@ -24,7 +24,7 @@
   "frameworks": {
     "netcoreapp1.0": {
       "buildOptions": {
-        "define": [ "NETSTANDARD", "FEATURE_EMBEDDED_RESOURCE" ],
+        "define": [ "NETSTANDARD" ],
         "compile": {
           "excludeFiles": [
             "Support/TestApiConsistency.cs"

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundleBundle.Designer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundleBundle.Designer.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundleBundle.Designer.cs
index 247be77..3b02f1e 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundleBundle.Designer.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundleBundle.Designer.cs
@@ -9,37 +9,36 @@
 //------------------------------------------------------------------------------
 
 namespace Lucene.Net.QueryParsers.Flexible.Messages {
+    using System;
     using System.Reflection;
     
     
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///    A strongly-typed resource class, for looking up localized strings, etc.
     /// </summary>
     // This class was auto-generated by the StronglyTypedResourceBuilder
     // class via a tool like ResGen or Visual Studio.
     // To add or remove a member, edit your .ResX file then rerun ResGen
     // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class MessagesTestBundleBundle {
+    public class MessagesTestBundleBundle {
         
         private static global::System.Resources.ResourceManager resourceMan;
         
         private static global::System.Globalization.CultureInfo resourceCulture;
         
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
         internal MessagesTestBundleBundle() {
         }
         
         /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
+        ///    Returns the cached ResourceManager instance used by this class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
+        public static global::System.Resources.ResourceManager ResourceManager {
             get {
                 if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lucene.Net.QueryParsers.Flexible.Messages.MessagesTestBundleBundle", typeof(MessagesTestBundleBundle).GetTypeInfo().Assembly);
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lucene.Net.Tests.QueryParser.Flexible.Messages.MessagesTestBundleBundle", typeof(MessagesTestBundleBundle).GetTypeInfo().Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
@@ -47,11 +46,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages {
         }
         
         /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
+        ///    Overrides the current thread's CurrentUICulture property for all
+        ///    resource lookups using this strongly typed resource class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
+        public static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }
@@ -61,18 +60,18 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Syntax Error: {0}.
+        ///    Looks up a localized string similar to Syntax Error: {0}.
         /// </summary>
-        internal static string Q0001E_INVALID_SYNTAX {
+        public static string Q0001E_INVALID_SYNTAX {
             get {
                 return ResourceManager.GetString("Q0001E_INVALID_SYNTAX", resourceCulture);
             }
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Truncated unicode escape sequence..
+        ///    Looks up a localized string similar to Truncated unicode escape sequence..
         /// </summary>
-        internal static string Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION {
+        public static string Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION {
             get {
                 return ResourceManager.GetString("Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION", resourceCulture);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs b/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
index 80d0ee5..a8bab1d 100644
--- a/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
@@ -31,13 +31,6 @@ namespace Lucene.Net.QueryParsers.Xml
 
     public class TestParser : LuceneTestCase
     {
-        internal const string RESOURCE_PATH =
-#if NETSTANDARD
-            "Lucene.Net.Tests.QueryParser.Xml.";
-#else
-            "Lucene.Net.QueryParsers.Xml.";
-#endif
-
         private static CoreParser builder;
         private static Store.Directory dir;
         private static IndexReader reader;
@@ -54,8 +47,7 @@ namespace Lucene.Net.QueryParsers.Xml
             builder = new CorePlusExtensionsParser("contents", analyzer);
 
             TextReader d = new StreamReader(
-            //    typeof(TestParser).getResourceAsStream("reuters21578.txt"), Encoding.ASCII);
-                typeof(TestParser).GetTypeInfo().Assembly.GetManifestResourceStream(RESOURCE_PATH + "reuters21578.txt"), Encoding.ASCII);
+                typeof(TestParser).getResourceAsStream("reuters21578.txt"), Encoding.ASCII);
             dir = NewDirectory();
             IndexWriter writer = new IndexWriter(dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, analyzer));
             String line = d.ReadLine();
@@ -255,9 +247,8 @@ namespace Lucene.Net.QueryParsers.Xml
 
         private Query Parse(String xmlFileName)
         {
-            //Stream xmlStream = typeof(TestParser).getResourceAsStream(xmlFileName);
-            using (Stream xmlStream = typeof(TestParser).GetTypeInfo().Assembly.GetManifestResourceStream(RESOURCE_PATH + xmlFileName))
-            { 
+            using (Stream xmlStream = typeof(TestParser).getResourceAsStream(xmlFileName))
+            {
                 Query result = builder.Parse(xmlStream);
                 return result;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.QueryParser/Xml/TestQueryTemplateManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Xml/TestQueryTemplateManager.cs b/src/Lucene.Net.Tests.QueryParser/Xml/TestQueryTemplateManager.cs
index 4842c97..6cbd031 100644
--- a/src/Lucene.Net.Tests.QueryParser/Xml/TestQueryTemplateManager.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Xml/TestQueryTemplateManager.cs
@@ -79,16 +79,15 @@ namespace Lucene.Net.QueryParsers.Xml
             //}
             //Cache all the query templates we will be referring to.
             QueryTemplateManager qtm = new QueryTemplateManager();
-            Assembly assembly = GetType().Assembly;
-            using (var stream = assembly.GetManifestResourceStream(TestParser.RESOURCE_PATH + "albumBooleanQuery.xsl"))
+            using (var stream = GetType().getResourceAsStream("albumBooleanQuery.xsl"))
             {
                 qtm.AddQueryTemplate("albumBooleanQuery", stream);
             }
-            using (var stream = assembly.GetManifestResourceStream(TestParser.RESOURCE_PATH + "albumFilteredQuery.xsl"))
+            using (var stream = GetType().getResourceAsStream("albumFilteredQuery.xsl"))
             {
                 qtm.AddQueryTemplate("albumFilteredQuery", stream);
             }
-            using (var stream = assembly.GetManifestResourceStream(TestParser.RESOURCE_PATH + "albumLuceneClassicQuery.xsl"))
+            using (var stream = GetType().getResourceAsStream("albumLuceneClassicQuery.xsl"))
             {
                 qtm.AddQueryTemplate("albumLuceneClassicQuery", stream);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery2.cs b/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery2.cs
index bf99a80..43b97aa 100644
--- a/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery2.cs
+++ b/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery2.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Sandbox.Queries
             {
                 Console.WriteLine("TEST: codePointTable=" + codePointTable);
             }
-            Stream stream = getResourceAsStream(GetType(), "fuzzyTestData.txt");
+            Stream stream = GetType().getResourceAsStream("fuzzyTestData.txt");
             TextReader reader = new StreamReader(stream, Encoding.UTF8);
 
             int bits = int.Parse(reader.ReadLine(), CultureInfo.InvariantCulture);
@@ -153,27 +153,6 @@ namespace Lucene.Net.Sandbox.Queries
             return sb.toString();
         }
 
-        private Stream getResourceAsStream(Type type, string filename)
-        {
-            var assembly = type.GetTypeInfo().Assembly;
-
-#if FEATURE_EMBEDDED_RESOURCE
-            string namespaceSegment = type.Namespace.Replace("Lucene.Net.Sandbox", string.Empty);
-            string assemblyName = assembly.GetName().Name;
-            var name = string.Concat(assemblyName, namespaceSegment, ".", filename);
-#else
-            var name = string.Join(".", type.Namespace, filename);
-#endif
-            var stream = assembly.GetManifestResourceStream(name);
-
-            if (stream == default(Stream))
-            {
-                throw new ArgumentException($"Could not find a resource with the name: {name}");
-            }
-
-            return stream;
-        }
-
         /* Code to generate test data
         public static void main(String args[]) throws Exception {
           int bits = 3;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Sandbox/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Sandbox/project.json b/src/Lucene.Net.Tests.Sandbox/project.json
index 8e06709..29f97ac 100644
--- a/src/Lucene.Net.Tests.Sandbox/project.json
+++ b/src/Lucene.Net.Tests.Sandbox/project.json
@@ -31,7 +31,6 @@
       },
       "imports": "dnxcore50",
       "buildOptions": {
-        "define": [ "FEATURE_EMBEDDED_RESOURCE" ],
         "compile": {
           "excludeFiles": [
             "Support/TestApiConsistency.cs"

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs b/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
index f7037b9..665ae28 100644
--- a/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
+++ b/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Spatial
 
     public abstract class StrategyTestCase : SpatialTestCase
     {
-        public const string RESOURCE_PATH = "Lucene.Net.Tests.Spatial.Test_Files.";
+        public const string RESOURCE_PATH = "Test_Files.";
         public const string DATA_RESOURCE_PATH = RESOURCE_PATH + "Data.";
 
         public static readonly String DATA_SIMPLE_BBOX = "simple-bbox.txt";
@@ -111,7 +111,7 @@ namespace Lucene.Net.Spatial
         protected virtual IEnumerator<SpatialTestData> getSampleData(String testDataFile)
         {
             String path = DATA_RESOURCE_PATH + testDataFile;
-            Stream stream = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(path);
+            Stream stream = GetType().getResourceAsStream(path);
             if (stream == null)
                 throw new FileNotFoundException("classpath resource not found: " + path);
             return SpatialTestData.GetTestData(stream, ctx);//closes the InputStream
@@ -119,7 +119,7 @@ namespace Lucene.Net.Spatial
 
         protected virtual IEnumerator<SpatialTestQuery> getTestQueries(String testQueryFile, SpatialContext ctx)
         {
-            Stream @in = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(RESOURCE_PATH + testQueryFile);
+            Stream @in = GetType().getResourceAsStream(RESOURCE_PATH + testQueryFile);
             return SpatialTestQuery.GetTestQueries(
                 argsParser, ctx, testQueryFile, @in);//closes the InputStream
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1743c9d8/src/Lucene.Net.Tests.Spatial/TestTestFramework.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/TestTestFramework.cs b/src/Lucene.Net.Tests.Spatial/TestTestFramework.cs
index 6f1bafc..6c36de0 100644
--- a/src/Lucene.Net.Tests.Spatial/TestTestFramework.cs
+++ b/src/Lucene.Net.Tests.Spatial/TestTestFramework.cs
@@ -34,7 +34,7 @@ namespace Lucene.Net.Spatial
         {
             String name = StrategyTestCase.RESOURCE_PATH + StrategyTestCase.QTEST_Cities_Intersects_BBox;
 
-            Stream @in = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(name);
+            Stream @in = GetType().getResourceAsStream(name);
             SpatialContext ctx = SpatialContext.GEO;
             IEnumerator<SpatialTestQuery> iter = SpatialTestQuery.GetTestQueries(
                 new SpatialArgsParser(), ctx, name, @in);//closes the InputStream


Mime
View raw message