Description

A proper-d-based value injector for Poodinis.

Package Information

Version 0.1.0 (2016-Dec-26)
Homepage http://lostmoment.com/open-source/poodinis
Repository https://github.com/mbierlee/poodinis-proper-d-injector
License MIT
Copyright Copyright 2014-2016 Mike Bierlee
Authors Mike Bierlee
Registered by Mike Bierlee
Dependencies

poodinis

proper-d

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

Proper-d-based value injector for Poodinis

Version 0.1.0 Copyright 2014-2016 Mike Bierlee Licensed under the terms of the MIT license - See LICENSE.txt

Master: Build Status - Dev: Build Status

This is a [proper-d]-based value injector for the Poodinis dependency injection framework

Requires at least a D 2.068.2 compatible compiler Uses the Phobos standard library Can be built with DUB 1.1.1 or higher

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.

Available versions

0.1.0 ~master ~develop