https://github.com/stillpoint-software/hyperbee.resources
Provides a dependency injection pattern for embedded resources.
https://github.com/stillpoint-software/hyperbee.resources
csharp dependency-injection dotnet embedded resources
Last synced: 6 months ago
JSON representation
Provides a dependency injection pattern for embedded resources.
- Host: GitHub
- URL: https://github.com/stillpoint-software/hyperbee.resources
- Owner: Stillpoint-Software
- License: other
- Created: 2024-04-11T15:10:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T05:08:15.000Z (7 months ago)
- Last Synced: 2024-12-16T16:50:35.408Z (6 months ago)
- Topics: csharp, dependency-injection, dotnet, embedded, resources
- Language: C#
- Homepage:
- Size: 597 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hyperbee.Resources
## Usage
Implement IResourceLocator and set the implementation's namespace to your resource location.
Inject IResourceProvider to use.
**For example:**
*this gives the path to the resources*
`public class MyResourceLocator : IResourceLocator
{
public string Namespace => typeof(MyResourceLocator).Namespace;
}`*register the provider*
* `services.AddTransient>();`
* `var locator = services.GetService>();`
* `var resource = ResourceHelper.GetResource( locator, "resourceName" ); `# Build Requirements
* To build and run this project, **.NET 9 SDK** is required.
* Ensure your development tools are compatible with .NET 8 or higher.## Building the Project
* With .NET 9 SDK installed, you can build the project using the standard `dotnet build` command.
## Running Tests
* Run tests using the `dotnet test` command as usual.
# Status
| Branch | Action |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `develop` | [](https://github.com/Stillpoint-Software/hyperbee.resources/actions/workflows/publish.yml) |
| `main` | [](https://github.com/Stillpoint-Software/hyperbee.resources/actions/workflows/publish.yml) |# Benchmarks
See [Benchmarks](https://github.com/Stillpoint-Software/Hyperbee.Resources/test/Hyperbee.Resources.Benchmark/benchmark/results/Hyperbee.Resources.Benchmark.ResourcesBenchmark-report-github.md)
# Help
See [Todo](https://github.com/Stillpoint-Software/hyperbee.resources/blob/main/docs/todo.md)
[](https://github.com/Stillpoint-Software/Hyperbee.Resources)