Skip to content

Provides a dependency injection pattern for embedded resources.

License

Notifications You must be signed in to change notification settings

Stillpoint-Software/hyperbee.resources

Folders and files

NameName
Last commit message
Last commit date
Nov 15, 2024
Apr 11, 2024
Apr 30, 2024
Nov 15, 2024
Apr 14, 2025
Apr 14, 2025
Apr 11, 2024
Apr 11, 2024
Apr 14, 2025
Apr 11, 2024
Nov 15, 2024
Apr 11, 2024
Jan 29, 2025
Nov 15, 2024
Apr 11, 2024

Repository files navigation

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<IResourceProvider<MyResourceLocator>>();
  • var locator = services.GetService<IResourceProvider<MyResourceLocator>>();
  • 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 Build status
main Build status

Benchmarks

See Benchmarks

Help

See Todo

Hyperbee.Resources