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.
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).
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 theGetResourceAsString
, I of course expected them to mirror the behavior ofAssembly.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).