- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 10
 
Simplify.Resources
        Alexanderius edited this page Jul 15, 2025 
        ·
        4 revisions
      
    Provides StringTable.Entry ambient context and ResourcesStringTable, IResourcesStringTable for retrieving strings from assembly resource files.
Available at NuGet as binary package
Retrieve a string from the executing assembly:
var str = StringTable.Entry["FooString"];The resource file should be named ProgramResources.resx and set as Embedded Resource.
The assembly's default namespace should match the assembly name.
You can create a custom ResourcesStringTable instance with a custom assembly from which to retrieve resources:
var rst = new ResourcesStringTable(Assembly.GetAssembly(typeof(MyType)), "ProgramResources");
var str = rst["FooString"];Specify a resource base name (if the default namespace does not match the assembly name):
var rst = new ResourcesStringTable(Assembly.GetAssembly(typeof(MyType)), "ProgramResources", "YourDefaultNamespace");
var str = rst["FooString"];