Description

Simple D Dependency Injection Framework

Package Information

Version0.3.3 (2016-Aug-04)
Repositoryhttps://github.com/o3o/endovena
LicenseBoost
CopyrightCopyright © 2014, Orfeo Da Viá
AuthorsOrfeo Da Viá
Registered byOrfeo Da Via'
Dependenciesnone

Installation

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

dub.json
dub.sdl

Readme

endovena

Build Status

Simple dependency injection framework for D. Based on Jakub Stasiak similar work.

Example usage

import std.conv : to;
import std.stdio : writefln;

import endovena;

interface IGreeter {
    string greet();
}

class Greeter: IGreeter {
    string greet() { return "Hello!"; }
}

void main() {
    Container container;
    container.register!(IGreeter, Greeter);
    auto greeter = container.get!IGreeter();
    writefln(greeter.greet)
}

Output:

    Hello!

See also directory tests/ and wiki.

Compiling

You can use dub:

$ dub build

Or (on linux) makefile:

$ make

Running tests

You need to have dub >= 0.9.21 installed and reacheble from your PATH.

dub --verbose test

or with make:

$ make

References

License

Distributed under the Boost Software License, Version 1.0. See copy at http://www.boost.org/LICENSE10.txt.

Available versions

0.3.3 0.3.1 0.3.0 0.2.0 0.1.0 ~master