yavsc/src/test/Mandatory/Resources.cs
Paul Schneider 9501ee1f16 Localize using strongly typed resources:
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
2019-06-16 13:10:14 +01:00

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);
}
}
}
}