Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

GetResourceAsString does not work as expected #23

Closed avonwyss closed 7 years ago

avonwyss commented 7 years ago

In the .NET framework, from day one on, there has been an overload for Assembly.GetManifestResourceStream() which takes a type and a string (name) as arguments.

So when I started to use JavaScriptEngineSwitcher and saw that there are two overloads of the GetResourceAsString, I of course expected them to mirror the behavior of Assembly.GetManifestResourceStream, that is, when a type is specified it should take the namespace into account. But unfortunately it doesn't...

Of course I can prepend the namespace to the name, but that's not a good solution because it makes the code more susceptible to breaking (change the default namespace in the project properties and bam! its broken at runtime).

Taritsyn commented 7 years ago

Hello, Arsene!

In JavaScript Engine Switcher 2.2.0 solved this problem.