endovena 0.3.4

Simple D Dependency Injection Framework


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:

endovena

Dub version Build Status Dub download 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.

Authors:
  • Orfeo Da Viá
Dependencies:
none
Versions:
0.3.4 2017-Mar-29
0.3.3 2016-Aug-04
0.3.1 2015-Sep-25
0.3.0 2014-Nov-27
0.2.0 2014-Oct-22
Show all 7 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 428 downloads total

Score:
1.8
Short URL:
endovena.dub.pm