generated Class with
strotygen -p -t Yavsc.Models.IT.Fixing.Bug.resx
must be modified :
* prefix with 'Yavsc.Server.Resources.' the baseName
in call to new System.Resources.ResourceManager
* remove the internal ctor
additionally, the generated class must be or unique or partial
23 lines
No EOL
634 B
C#
23 lines
No EOL
634 B
C#
|
|
namespace test {
|
|
public class ResxResources {
|
|
const string resPath = "Resources/Test.TestResources.resx";
|
|
|
|
public void HaveAResxLoader()
|
|
{
|
|
System.Resources.ResourceReader loader = new System.Resources.ResourceReader(resPath);
|
|
// IDictionary
|
|
var etor = loader.GetEnumerator();
|
|
while (etor.Current !=null)
|
|
{
|
|
byte[] data;
|
|
string stringdata;
|
|
string resName = etor.Key.ToString();
|
|
|
|
loader.GetResourceData(resName, out stringdata, out data);
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
} |