poodinis-proper-d-injector 2.0.0
A proper-d-based value injector for Poodinis.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Proper-d-based value injector for Poodinis
Version 2.0.0 Copyright 2014-2023 Mike Bierlee Licensed under the terms of the MIT license - See LICENSE.txt
This is a [proper-d]-based value injector for the Poodinis dependency injection framework
Requires at least a D 2.086.1 compatible compiler
Uses the Phobos standard library
Getting Started
DUB Dependency
See the DUB project page for instructions on how to include this value injector into your project. You might also need to add Poodinis to your project.
Quickstart
import poodinis;
import poodinis.valueinjector.properd;
import properd;
class HttpServer {
@Value("http.port")
private int port = 80;
public void start() {
import std.stdio, std.conv;
writeln("Started server on port " ~ port.to!string);
}
}
void main() {
auto container = new shared DependencyContainer();
container.register!HttpServer;
auto properties = parseProperties("http.port = 9000");
container.registerProperdProperties(properties);
auto server = container.resolve!HttpServer;
server.start();
}
For more information on how to use proper-d, see the [proper-d] github page.
- 2.0.0 released a year ago
- mbierlee/poodinis-proper-d-injector
- lostmoment.com/open-source/poodinis
- MIT
- Copyright 2014-2023 Mike Bierlee
- Authors:
- Dependencies:
- poodinis, proper-d
- Versions:
-
2.0.0 2023-Mar-13 1.0.0 2021-Jul-06 0.1.0 2016-Dec-26 ~main 2023-Mar-13 ~develop 2023-Mar-13 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
183 downloads total
-
- Score:
- 0.8
- Short URL:
- poodinis-proper-d-injector.dub.pm